7
7
pull_request :
8
8
types :
9
9
- opened
10
+ - reopened
10
11
- synchronize
11
12
concurrency :
12
13
group : build-${{ github.event.pull_request.number || github.ref }}
13
14
cancel-in-progress : true
14
15
jobs :
15
- all :
16
+ analyze :
16
17
runs-on : ubuntu-latest
17
- needs :
18
- - lint
19
- - audit
20
- - test
21
- outputs :
22
- PASSED : ${{ steps.set-output.outputs.PASSED }}
23
18
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
31
27
- name : Set up Ruby
32
28
uses : ruby/setup-ruby@v1
33
29
with :
34
30
bundler-cache : true
35
31
- name : Use Node.js
36
- uses : actions/setup-node@v3
32
+ uses : actions/setup-node@v4
37
33
with :
38
34
node-version-file : " .nvmrc"
39
35
cache : " yarn"
40
36
- name : Install Yarn dependencies
41
37
run : yarn --immutable
42
38
- name : Lint
43
39
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
76
40
- name : Audit
77
41
run : yarn audit
42
+
78
43
test :
79
44
needs :
80
- - lint
81
- - audit
82
- runs-on : ubuntu-20.04
45
+ - analyze
46
+ runs-on : ubuntu-latest
83
47
strategy :
84
48
fail-fast : false
85
49
matrix :
97
61
env :
98
62
BUNDLE_GEMFILE : gemfiles/${{ matrix.rails_appraisal }}_${{ matrix.rspec_appraisal }}.gemfile
99
63
steps :
100
- - uses : actions/checkout@v3
64
+ - uses : actions/checkout@v4
101
65
- name : Set up Ruby
102
66
uses : ruby/setup-ruby@v1
103
67
with :
@@ -116,3 +80,11 @@ jobs:
116
80
log-output-if : failure
117
81
- name : Run tests
118
82
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