Reuse ci workflow (#819)

This commit is contained in:
Zach Gollwitzer
2024-05-30 15:44:16 -04:00
committed by GitHub
parent df391e0a14
commit ee162bbef7
3 changed files with 24 additions and 53 deletions

View File

@@ -1,7 +1,7 @@
name: CI
on:
pull_request:
workflow_call:
jobs:
scan_ruby:
@@ -59,6 +59,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432
RAILS_ENV: test
services:
postgres:
image: postgres
@@ -82,16 +86,19 @@ jobs:
ruby-version: .ruby-version
bundler-cache: true
- name: Run tests and smoke test seed
env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:postgres@localhost:5432
- name: DB setup and smoke test
run: |
bin/rails db:create
bin/rails db:schema:load
bin/rails test
bin/rails db:seed
- name: Unit and integration tests
run: bin/rails test
- name: System tests
run: DISABLE_PARALLELIZATION=true bin/rails test:system
continue-on-error: true # TODO: Eventually we'll enforce for PRs
- name: Keep screenshots from failed system tests
uses: actions/upload-artifact@v4
if: failure()