1- name : Ruby workflow
1+ # Configuration for Ruby CI
2+ # To force the execution of this workflow, add [run ruby] to your commit message
3+ name : ' CI - Ruby'
24
35on :
46 workflow_dispatch :
5- workflow_call :
7+
68 schedule :
79 - cron : ' 35 9,21 * * *'
810
11+ push :
12+ branches :
13+ - trunk
14+ pull_request :
15+ branches :
16+ - trunk
17+
918jobs :
19+ check_workflow :
20+ uses : ./.github/workflows/should-workflow-run.yml
21+ with :
22+ bazel-target-prefix : ' //rb'
23+
1024 build :
25+ if : ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run ruby]') == true }}
26+ needs : check_workflow
1127 runs-on : ubuntu-latest
1228 strategy :
1329 fail-fast : false
1430 matrix :
15- target : ['selenium-devtools', 'selenium-webdriver']
31+ target : [ 'selenium-devtools', 'selenium-webdriver' ]
1632 steps :
1733 - uses : actions/checkout@v2
1834 - uses : actions/setup-java@v1
@@ -35,11 +51,13 @@ jobs:
3551 command : build //rb:${{ matrix.target }}
3652
3753 chrome-test :
54+ if : ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run ruby]') == true }}
55+ needs : check_workflow
3856 runs-on : ubuntu-latest
3957 strategy :
4058 fail-fast : false
4159 matrix :
42- target : ['chrome-test', 'remote-chrome-test']
60+ target : [ 'chrome-test', 'remote-chrome-test' ]
4361 steps :
4462 - uses : actions/checkout@v2
4563 - uses : actions/setup-java@v1
@@ -66,11 +84,13 @@ jobs:
6684 DISPLAY : :99
6785
6886 firefox-test :
87+ if : ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run ruby]') == true }}
88+ needs : check_workflow
6989 runs-on : ubuntu-latest
7090 strategy :
7191 fail-fast : false
7292 matrix :
73- target : ['firefox-test', 'remote-firefox-test']
93+ target : [ 'firefox-test', 'remote-firefox-test' ]
7494 steps :
7595 - uses : actions/checkout@v2
7696 - uses : actions/setup-java@v1
@@ -100,6 +120,8 @@ jobs:
100120 DISPLAY : :99
101121
102122 docs :
123+ if : ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run ruby]') == true }}
124+ needs : check_workflow
103125 runs-on : ubuntu-latest
104126 steps :
105127 - uses : actions/checkout@v2
@@ -120,6 +142,8 @@ jobs:
120142 command : run //rb:docs
121143
122144 lint :
145+ if : ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run ruby]') == true }}
146+ needs : check_workflow
123147 runs-on : ubuntu-latest
124148 steps :
125149 - uses : actions/checkout@v2
@@ -140,11 +164,13 @@ jobs:
140164 command : run //rb:lint
141165
142166 unit-test :
167+ if : ${{ needs.check_workflow.outputs.result == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || contains(toJson(github.event.commits), '[run ruby]') == true }}
168+ needs : check_workflow
143169 runs-on : ubuntu-latest
144170 strategy :
145171 fail-fast : false
146172 matrix :
147- ruby : ['2.6', 'jruby-9.3.0.0']
173+ ruby : [ '2.6', 'jruby-9.3.0.0' ]
148174 steps :
149175 - uses : actions/checkout@v2
150176 - uses : ruby/setup-ruby@v1
0 commit comments