77 pull_request :
88 types :
99 - opened
10+ - reopened
1011 - synchronize
1112concurrency :
1213 group : build-${{ github.event.pull_request.number || github.ref }}
1314 cancel-in-progress : true
1415jobs :
15- all :
16+ analyze :
1617 runs-on : ubuntu-latest
17- needs :
18- - lint
19- - audit
20- - test
21- outputs :
22- PASSED : ${{ steps.set-output.outputs.PASSED }}
2318 steps :
24- - name : Set PASSED output
25- id : set-output
26- run : echo "PASSED=true" >> "$GITHUB_OUTPUT"
27- lint :
28- runs-on : ubuntu-latest
29- steps :
30- - uses : actions/checkout@v3
19+ - uses : actions/checkout@v4
20+ - name : Download actionlint
21+ id : download-actionlint
22+ run : bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.6.23
23+ shell : bash
24+ - name : Check workflow files
25+ run : ${{ steps.download-actionlint.outputs.executable }} -color
26+ shell : bash
3127 - name : Set up Ruby
3228 uses : ruby/setup-ruby@v1
3329 with :
3430 bundler-cache : true
3531 - name : Use Node.js
36- uses : actions/setup-node@v3
32+ uses : actions/setup-node@v4
3733 with :
3834 node-version-file : " .nvmrc"
3935 cache : " yarn"
4036 - name : Install Yarn dependencies
4137 run : yarn --immutable
4238 - name : Lint
4339 run : yarn lint
44- audit :
45- runs-on : ubuntu-latest
46- strategy :
47- fail-fast : false
48- matrix :
49- ruby :
50- - " 3.0"
51- - " 3.1"
52- - " 3.2"
53- rails_appraisal :
54- - rails_6_1
55- - rails_7_0
56- - no_rails
57- rspec_appraisal :
58- - rspec_lt_3_10
59- - rspec_gte_3_10
60- env :
61- BUNDLE_GEMFILE : gemfiles/${{ matrix.rails_appraisal }}_${{ matrix.rspec_appraisal }}.gemfile
62- steps :
63- - uses : actions/checkout@v3
64- - name : Set up Ruby
65- uses : ruby/setup-ruby@v1
66- with :
67- ruby-version : ${{ matrix.ruby }}
68- bundler-cache : true
69- - name : Use Node.js
70- uses : actions/setup-node@v3
71- with :
72- node-version-file : " .nvmrc"
73- cache : " yarn"
74- - name : Install Yarn dependencies
75- run : yarn --immutable
7640 - name : Audit
7741 run : yarn audit
42+
7843 test :
7944 needs :
80- - lint
81- - audit
82- runs-on : ubuntu-20.04
45+ - analyze
46+ runs-on : ubuntu-latest
8347 strategy :
8448 fail-fast : false
8549 matrix :
9761 env :
9862 BUNDLE_GEMFILE : gemfiles/${{ matrix.rails_appraisal }}_${{ matrix.rspec_appraisal }}.gemfile
9963 steps :
100- - uses : actions/checkout@v3
64+ - uses : actions/checkout@v4
10165 - name : Set up Ruby
10266 uses : ruby/setup-ruby@v1
10367 with :
@@ -116,3 +80,11 @@ jobs:
11680 log-output-if : failure
11781 - name : Run tests
11882 run : bundle exec rake --trace
83+
84+ ready-to-merge :
85+ runs-on : ubuntu-latest
86+ needs :
87+ - analyze
88+ - test
89+ steps :
90+ - run : echo "Analysis and tests passed. Ready to merge."
0 commit comments