@@ -12,7 +12,7 @@ concurrency:
1212
1313jobs :
1414 typescript :
15- name : typescript
15+ name : TypeScript check
1616 runs-on : ubuntu-latest
1717 steps :
1818 - uses : actions/checkout@v5
3131 - name : tsc on resulting generated files
3232 run : yarn run tsc --noEmit
3333 vitest :
34- name : vitest
34+ name : Vitest
3535 runs-on : ubuntu-latest
3636 steps :
3737 - uses : actions/checkout@v5
6969 path : coverage/*
7070 minitest :
7171 permissions : write-all
72- name : minitest
72+ name : Minitest
7373 runs-on : ubuntu-latest
7474 env :
7575 TEST_DATABASE_URL : postgres://postgres:postgres@localhost/intercode_test
@@ -124,8 +124,78 @@ jobs:
124124 with :
125125 name : minitest-coverage
126126 path : coverage/*
127+ minitest-system :
128+ permissions : write-all
129+ name : Minitest system tests
130+ runs-on : ubuntu-latest
131+ env :
132+ TEST_DATABASE_URL : postgres://postgres:postgres@localhost/intercode_test
133+ RAILS_ENV : test
134+ services :
135+ postgres :
136+ image : postgres:18
137+ env :
138+ POSTGRES_PASSWORD : postgres
139+ options : >-
140+ --health-cmd pg_isready
141+ --health-interval 10s
142+ --health-timeout 5s
143+ --health-retries 5
144+ ports :
145+ - 5432:5432
146+ steps :
147+ - uses : actions/checkout@v5
148+ - name : Install libvips42
149+ run : sudo apt-get update && sudo apt-get install libvips42
150+ - name : Upgrade postgres client utilities
151+ run : |
152+ sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
153+ wget -qO- https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo tee /etc/apt/trusted.gpg.d/pgdg.asc &>/dev/null
154+ sudo apt-get update
155+ sudo apt-get install postgresql-client-18 -y
156+ - name : Set up Ruby
157+ uses : ruby/setup-ruby@v1
158+ with :
159+ bundler-cache : true
160+ - name : Read .node-version
161+ id : node-version
162+ run : echo "node-version=$(cat .node-version)" >> $GITHUB_OUTPUT
163+ - name : install node
164+ uses : actions/setup-node@v6
165+ with :
166+ cache : yarn
167+ node-version : ${{ steps.node-version.outputs.node-version }}
168+ - name : yarn install
169+ run : yarn install
170+ - name : build
171+ run : yarn run build
172+ - name : Database setup
173+ run : bundle exec rails db:create db:migrate
174+ - name : Run tests
175+ run : TERM=xterm-color bundle exec rails test:system
176+ - name : Publish Test Report
177+ uses : mikepenz/action-junit-report@v6
178+ if : always() # always run even if the previous step fails
179+ with :
180+ check_name : " Minitest System Test Report"
181+ report_paths : " test/reports/TEST-*.xml"
182+ detailed_summary : true
183+ skip_success_summary : true
184+ - name : Archive HTML test reports
185+ uses : actions/upload-artifact@v5
186+ if : always()
187+ with :
188+ name : minitest-system-reports
189+ path : test/html_reports/*
190+ - name : Archive coverage report
191+ uses : actions/upload-artifact@v5
192+ if : always()
193+ with :
194+ name : minitest-system-coverage
195+ path : coverage/*
127196 docker-build :
128197 runs-on : ubuntu-latest
198+ name : Build containers
129199 steps :
130200 - uses : actions/checkout@v5
131201 - name : Read .node-version
@@ -231,23 +301,30 @@ jobs:
231301 path : doc-site.tar.gz
232302 coverage-report :
233303 runs-on : ubuntu-latest
304+ name : Test coverage report
234305 if : github.actor != 'dependabot[bot]'
235306 needs :
236307 - vitest
237308 - minitest
309+ - minitest-system
238310 steps :
239311 - name : Download Minitest coverage
240312 uses : actions/download-artifact@v6
241313 with :
242314 name : minitest-coverage
243315 path : minitest-coverage
316+ - name : Download Minitest system test coverage
317+ uses : actions/download-artifact@v6
318+ with :
319+ name : minitest-system-coverage
320+ path : minitest-system-coverage
244321 - name : Download Vitest coverage
245322 uses : actions/download-artifact@v6
246323 with :
247324 name : vitest-coverage
248325 path : vitest-coverage
249326 - name : Merge coverage reports
250- run : npx cobertura-merge -o merged-coverage.xml package1=minitest-coverage/coverage.xml package2=vitest-coverage/cobertura-coverage.xml
327+ run : npx cobertura-merge -o merged-coverage.xml package1=minitest-coverage/coverage.xml package2=vitest-coverage/cobertura-coverage.xml package3=minitest-system-coverage/coverage.xml
251328 - name : Generate Coverage Report
252329 uses : clearlyip/code-coverage-report-action@v6
253330 id : code_coverage_report_action
@@ -264,11 +341,13 @@ jobs:
264341 path : code-coverage-results.md
265342 update-release-draft :
266343 runs-on : ubuntu-latest
344+ name : Update release draft
267345 if : github.event_name == 'push' && github.event.ref == 'refs/heads/main'
268346 needs :
269347 - typescript
270348 - vitest
271349 - minitest
350+ - minitest-system
272351 - docker-build
273352 - doc-site
274353 outputs :
0 commit comments