Skip to content

Commit d25aa65

Browse files
committed
Removing python from dispatch-workflows.yml
1 parent f21821e commit d25aa65

File tree

3 files changed

+39
-22
lines changed

3 files changed

+39
-22
lines changed

‎.github/workflows/java-ci.yml renamed to ‎.github/workflows/ci-java.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Configuration for Java CI
2+
# To force the execution of this workflow, add [run java] to your commit message
23
name: 'CI - Java'
34

45
on:
@@ -24,7 +25,7 @@ jobs:
2425
bazel-target-prefix: '//java'
2526

2627
build:
27-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
28+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run java]') == true }}
2829
needs: check_workflow
2930
runs-on: ubuntu-latest
3031
steps:
@@ -51,7 +52,7 @@ jobs:
5152
command: build grid
5253

5354
small_tests:
54-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
55+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run java]') == true }}
5556
needs: [ check_workflow, build ]
5657
runs-on: ubuntu-latest
5758
steps:
@@ -86,7 +87,7 @@ jobs:
8687
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
8788

8889
lint:
89-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
90+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run java]') == true }}
9091
needs: [ check_workflow, build ]
9192
runs-on: ubuntu-latest
9293
steps:
@@ -114,7 +115,7 @@ jobs:
114115
query: attr(tags, lint, tests(//java/...))
115116

116117
browser_tests:
117-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
118+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run java]') == true }}
118119
needs: [ check_workflow, small_tests ]
119120
runs-on: ubuntu-latest
120121
strategy:
@@ -171,7 +172,7 @@ jobs:
171172
DISPLAY: :99
172173

173174
server_tests:
174-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
175+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run java]') == true }}
175176
needs: [ check_workflow, small_tests ]
176177
runs-on: ubuntu-latest
177178
strategy:
@@ -229,7 +230,7 @@ jobs:
229230
DISPLAY: :99
230231

231232
rc_tests:
232-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
233+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run java]') == true }}
233234
needs: [ check_workflow, small_tests ]
234235
runs-on: ubuntu-latest
235236
steps:
@@ -266,7 +267,7 @@ jobs:
266267
DISPLAY: :99
267268

268269
javadoc:
269-
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
270+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run java]') == true }}
270271
needs: [ check_workflow, build ]
271272
runs-on: ubuntu-latest
272273
steps:

‎.github/workflows/python.yml renamed to ‎.github/workflows/ci-python.yml

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,29 @@
1-
name: Python workflow
1+
# Configuration for Python CI
2+
# To force the execution of this workflow, add [run python] to your commit message
3+
name: 'CI - Python'
24

35
on:
46
workflow_dispatch:
5-
workflow_call:
7+
68
schedule:
79
- cron: '05 9,21 * * *'
810

11+
push:
12+
branches:
13+
- trunk
14+
pull_request:
15+
branches:
16+
- trunk
17+
918
jobs:
19+
check_workflow:
20+
uses: ./.github/workflows/should-workflow-run.yml
21+
with:
22+
bazel-target-prefix: '//py'
23+
1024
tox_flake8:
25+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
26+
needs: check_workflow
1127
runs-on: ubuntu-latest
1228
steps:
1329
- name: Checkout source tree
@@ -26,6 +42,8 @@ jobs:
2642
TOXENV: flake8
2743

2844
tox_docs:
45+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
46+
needs: check_workflow
2947
runs-on: ubuntu-latest
3048
steps:
3149
- name: Checkout source tree
@@ -44,6 +62,8 @@ jobs:
4462
TOXENV: docs
4563

4664
tox_mypy:
65+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
66+
needs: check_workflow
4767
runs-on: ubuntu-latest
4868
steps:
4969
- name: Checkout source tree
@@ -64,6 +84,8 @@ jobs:
6484
TOXENV: mypy
6585

6686
unit_tests:
87+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
88+
needs: check_workflow
6789
runs-on: ubuntu-latest
6890
steps:
6991
- name: Checkout source tree
@@ -93,7 +115,8 @@ jobs:
93115
command: test //py:unit
94116

95117
chrome_tests:
96-
needs: unit_tests
118+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
119+
needs: [ check_workflow, unit_tests ]
97120
runs-on: ubuntu-latest
98121
steps:
99122
- name: Checkout source tree
@@ -130,7 +153,8 @@ jobs:
130153
DISPLAY: :99
131154

132155
firefox_tests_remote:
133-
needs: unit_tests
156+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
157+
needs: [ check_workflow, unit_tests ]
134158
runs-on: ubuntu-latest
135159
steps:
136160
- name: Checkout source tree
@@ -169,7 +193,8 @@ jobs:
169193
DISPLAY: :99
170194

171195
firefox_tests:
172-
needs: unit_tests
196+
if: ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run python]') == true }}
197+
needs: [ check_workflow, unit_tests ]
173198
runs-on: ubuntu-latest
174199
steps:
175200
- name: Checkout source tree
@@ -206,3 +231,4 @@ jobs:
206231
command: test //py:test-firefox
207232
env:
208233
DISPLAY: :99
234+

‎.github/workflows/dispatch-workflows.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ on:
1010
- trunk
1111

1212
jobs:
13-
check_python:
14-
uses: ./.github/workflows/should-workflow-run.yml
15-
with:
16-
bazel-target-prefix: '//py'
17-
18-
run_python:
19-
uses: ./.github/workflows/python.yml
20-
needs: check_python
21-
if: ${{ needs.check_python.outputs.result == 'true' }}
22-
2313
check_ruby:
2414
uses: ./.github/workflows/should-workflow-run.yml
2515
with:

0 commit comments

Comments
 (0)