@@ -15,31 +15,31 @@ concurrency:
1515 cancel-in-progress : true
1616
1717env :
18- FERRUM_PROCESS_TIMEOUT : 60
18+ FERRUM_PROCESS_TIMEOUT : 45
1919
2020jobs :
2121 accessibility :
2222 name : Accessibility
2323 runs-on : ubuntu-latest
2424 steps :
25- - uses : actions/checkout@v4
26- - uses : ruby/setup-ruby@v1
27- with :
28- ruby-version : ' 3.2'
29- bundler-cache : true
30- - uses : actions/setup-node@v4
31- with :
32- node-version : 16
33- cache : ' npm'
34- cache-dependency-path : |
35- package-lock.json
36- demo/package-lock.json
37- - name : Build
38- run : |
39- npm ci
40- cd demo && npm ci
41- - name : Test
42- run : bundle exec rake test:accessibility
25+ - uses : actions/checkout@v4
26+ - uses : ruby/setup-ruby@v1
27+ with :
28+ ruby-version : ' 3.2'
29+ bundler-cache : true
30+ - uses : actions/setup-node@v4
31+ with :
32+ node-version : 16
33+ cache : ' npm'
34+ cache-dependency-path : |
35+ package-lock.json
36+ demo/package-lock.json
37+ - name : Build
38+ run : |
39+ npm ci
40+ cd demo && npm ci
41+ - name : Test
42+ run : bundle exec rake test:accessibility
4343 components :
4444 name : Components
4545 runs-on : ubuntu-latest
@@ -58,32 +58,32 @@ jobs:
5858 - rails_version : " main"
5959 ruby_version : " 3.2"
6060 steps :
61- - uses : actions/checkout@v4
62- - uses : ruby/setup-ruby@v1
63- with :
64- ruby-version : ${{ matrix.ruby_version }}
65- bundler-cache : true
66- cache-version : ${{ matrix.rails_version }}-${{ matrix.ruby_version }}
67- - uses : actions/setup-node@v4
68- with :
69- node-version : 16
70- cache : ' npm'
71- - name : Build
72- run : |
73- npm ci
74- bundle config unset deployment
75- bundle update
76- env :
77- RUBY_VERSION : ${{ matrix.ruby_version }}
78- RAILS_VERSION : ${{ matrix.rails_version }}
79- - name : Test
80- run : |
81- bundle exec rake test:components
82- bundle exec rake test:coverage
83- env :
84- COVERAGE : 1
85- RUBY_VERSION : ${{ matrix.ruby_version }}
86- RAILS_VERSION : ${{ matrix.rails_version }}
61+ - uses : actions/checkout@v4
62+ - uses : ruby/setup-ruby@v1
63+ with :
64+ ruby-version : ${{ matrix.ruby_version }}
65+ bundler-cache : true
66+ cache-version : ${{ matrix.rails_version }}-${{ matrix.ruby_version }}
67+ - uses : actions/setup-node@v4
68+ with :
69+ node-version : 16
70+ cache : ' npm'
71+ - name : Build
72+ run : |
73+ npm ci
74+ bundle config unset deployment
75+ bundle update
76+ env :
77+ RUBY_VERSION : ${{ matrix.ruby_version }}
78+ RAILS_VERSION : ${{ matrix.rails_version }}
79+ - name : Test
80+ run : |
81+ bundle exec rake test:components
82+ bundle exec rake test:coverage
83+ env :
84+ COVERAGE : 1
85+ RUBY_VERSION : ${{ matrix.ruby_version }}
86+ RAILS_VERSION : ${{ matrix.rails_version }}
8787 lib :
8888 name : Lib
8989 runs-on : ubuntu-latest
@@ -102,32 +102,32 @@ jobs:
102102 - rails_version : " main"
103103 ruby_version : " 3.2"
104104 steps :
105- - uses : actions/checkout@v4
106- - uses : ruby/setup-ruby@v1
107- with :
108- ruby-version : ${{ matrix.ruby_version }}
109- bundler-cache : true
110- cache-version : ${{ matrix.rails_version }}-${{ matrix.ruby_version }}
111- - uses : actions/setup-node@v4
112- with :
113- node-version : 16
114- cache : ' npm'
115- - name : Build
116- run : |
117- npm ci
118- bundle config unset deployment
119- bundle update
120- env :
121- RUBY_VERSION : ${{ matrix.ruby_version }}
122- RAILS_VERSION : ${{ matrix.rails_version }}
123- - name : Test
124- run : |
125- bundle exec rake test:lib
126- bundle exec rake test:coverage
127- env :
128- COVERAGE : 1
129- RUBY_VERSION : ${{ matrix.ruby_version }}
130- RAILS_VERSION : ${{ matrix.rails_version }}
105+ - uses : actions/checkout@v4
106+ - uses : ruby/setup-ruby@v1
107+ with :
108+ ruby-version : ${{ matrix.ruby_version }}
109+ bundler-cache : true
110+ cache-version : ${{ matrix.rails_version }}-${{ matrix.ruby_version }}
111+ - uses : actions/setup-node@v4
112+ with :
113+ node-version : 16
114+ cache : ' npm'
115+ - name : Build
116+ run : |
117+ npm ci
118+ bundle config unset deployment
119+ bundle update
120+ env :
121+ RUBY_VERSION : ${{ matrix.ruby_version }}
122+ RAILS_VERSION : ${{ matrix.rails_version }}
123+ - name : Test
124+ run : |
125+ bundle exec rake test:lib
126+ bundle exec rake test:coverage
127+ env :
128+ COVERAGE : 1
129+ RUBY_VERSION : ${{ matrix.ruby_version }}
130+ RAILS_VERSION : ${{ matrix.rails_version }}
131131 performance :
132132 name : Performance
133133 runs-on : ubuntu-latest
@@ -146,105 +146,105 @@ jobs:
146146 - rails_version : " main"
147147 ruby_version : " 3.2"
148148 steps :
149- - uses : actions/checkout@v4
150- - uses : ruby/setup-ruby@v1
151- with :
152- ruby-version : ${{ matrix.ruby_version }}
153- bundler-cache : true
154- cache-version : ${{ matrix.rails_version }}-${{ matrix.ruby_version }}
155- - name : Build
156- run : |
157- bundle config unset deployment
158- bundle update
159- env :
160- RUBY_VERSION : ${{ matrix.ruby_version }}
161- RAILS_VERSION : ${{ matrix.rails_version }}
162- - name : Test
163- run : |
164- bundle exec rake test:performance
165- env :
166- RUBY_VERSION : ${{ matrix.ruby_version }}
167- RAILS_VERSION : ${{ matrix.rails_version }}
149+ - uses : actions/checkout@v4
150+ - uses : ruby/setup-ruby@v1
151+ with :
152+ ruby-version : ${{ matrix.ruby_version }}
153+ bundler-cache : true
154+ cache-version : ${{ matrix.rails_version }}-${{ matrix.ruby_version }}
155+ - name : Build
156+ run : |
157+ bundle config unset deployment
158+ bundle update
159+ env :
160+ RUBY_VERSION : ${{ matrix.ruby_version }}
161+ RAILS_VERSION : ${{ matrix.rails_version }}
162+ - name : Test
163+ run : |
164+ bundle exec rake test:performance
165+ env :
166+ RUBY_VERSION : ${{ matrix.ruby_version }}
167+ RAILS_VERSION : ${{ matrix.rails_version }}
168168 system :
169169 name : System
170170 runs-on : ubuntu-latest
171171 steps :
172- - uses : actions/checkout@v4
173- - uses : ruby/setup-ruby@v1
174- with :
175- ruby-version : ' 3.2'
176- bundler-cache : true
177- - uses : actions/setup-node@v4
178- with :
179- node-version : 16
180- cache : ' npm'
181- cache-dependency-path : |
182- package-lock.json
183- demo/package-lock.json
184- - name : Build
185- run : |
186- npm ci
187- cd demo && npm ci
188- - name : Test
189- run : |
190- bundle exec rake test:system
172+ - uses : actions/checkout@v4
173+ - uses : ruby/setup-ruby@v1
174+ with :
175+ ruby-version : ' 3.2'
176+ bundler-cache : true
177+ - uses : actions/setup-node@v4
178+ with :
179+ node-version : 16
180+ cache : ' npm'
181+ cache-dependency-path : |
182+ package-lock.json
183+ demo/package-lock.json
184+ - name : Build
185+ run : |
186+ npm ci
187+ cd demo && npm ci
188+ - name : Test
189+ run : |
190+ bundle exec rake test:system
191191 visual :
192192 name : Visual Regressions
193193 if : ${{ github.event_name == 'pull_request' }}
194194 timeout-minutes : 20
195195 runs-on : ubuntu-latest
196196 steps :
197- - uses : actions/checkout@v4
198- - uses : ruby/setup-ruby@v1
199- with :
200- ruby-version : ' 3.2'
201- bundler-cache : true
202- - uses : actions/setup-node@v4
203- with :
204- node-version : 16
205- cache : ' npm'
206- cache-dependency-path : |
207- package-lock.json
208- demo/package-lock.json
209- - name : Build
210- run : |
211- npm ci
212- bundle install
213- bundle exec rake static:dump
214- cd demo
215- npm ci
216- bundle install
217- - name : Install Playwright Browsers
218- run : npx playwright install --with-deps
219- - name : Run Playwright tests
220- id : playwright-run
221- continue-on-error : true
222- run : npx playwright test --workers 6
223- - id : auto-commit
224- uses : stefanzweifel/git-auto-commit-action@v5
225- with :
226- commit_message : Generating component snapshots
227- file_pattern : .playwright/screenshots/**/*.png
228- - name : " Changes detected"
229- if : steps.auto-commit.outputs.changes_detected == 'true'
230- uses : phulsechinmay/rewritable-pr-comment@v0.3.0
231- with :
232- message : |
233- ### ⚠️ Visual differences found
234-
235- Our visual comparison tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.
236-
237- [Review visual differences](https://github.com/opf/primer_view_components/pull/${{ github.event.number }}/files?file-filters%5B%5D=.png&show-viewed-files=false)
238- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
239- COMMENT_IDENTIFIER : ' visual-comparison-diff'
240- - uses : actions/upload-artifact@v4
241- with :
242- name : playwright-report
243- path : .playwright/report/
244- retention-days : 30
245- - name : Failure
246- if : ${{ steps.auto-commit.outputs.changes_detected == 'true' || steps.playwright-run.outcome == 'failure' }}
247- run : exit 1
197+ - uses : actions/checkout@v4
198+ - uses : ruby/setup-ruby@v1
199+ with :
200+ ruby-version : ' 3.2'
201+ bundler-cache : true
202+ - uses : actions/setup-node@v4
203+ with :
204+ node-version : 16
205+ cache : ' npm'
206+ cache-dependency-path : |
207+ package-lock.json
208+ demo/package-lock.json
209+ - name : Build
210+ run : |
211+ npm ci
212+ bundle install
213+ bundle exec rake static:dump
214+ cd demo
215+ npm ci
216+ bundle install
217+ - name : Install Playwright Browsers
218+ run : npx playwright install --with-deps
219+ - name : Run Playwright tests
220+ id : playwright-run
221+ continue-on-error : true
222+ run : npx playwright test --workers 6
223+ - id : auto-commit
224+ uses : stefanzweifel/git-auto-commit-action@v5
225+ with :
226+ commit_message : Generating component snapshots
227+ file_pattern : .playwright/screenshots/**/*.png
228+ - name : " Changes detected"
229+ if : steps.auto-commit.outputs.changes_detected == 'true'
230+ uses : phulsechinmay/rewritable-pr-comment@v0.3.0
231+ with :
232+ message : |
233+ ### ⚠️ Visual differences found
234+
235+ Our visual comparison tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.
236+
237+ [Review visual differences](https://github.com/opf/primer_view_components/pull/${{ github.event.number }}/files?file-filters%5B%5D=.png&show-viewed-files=false)
238+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
239+ COMMENT_IDENTIFIER : ' visual-comparison-diff'
240+ - uses : actions/upload-artifact@v4
241+ with :
242+ name : playwright-report
243+ path : .playwright/report/
244+ retention-days : 30
245+ - name : Failure
246+ if : ${{ steps.auto-commit.outputs.changes_detected == 'true' || steps.playwright-run.outcome == 'failure' }}
247+ run : exit 1
248248 selectors :
249249 name : CSS coverage
250250 runs-on : ubuntu-latest
0 commit comments