Skip to content

Create a separate process with a single worker #24388

Create a separate process with a single worker

Create a separate process with a single worker #24388

Workflow file for this run

name: Test
on:
pull_request:
workflow_call:
permissions: {}
jobs:
rspec:
name: RSpec
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17.2
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5432:5432
env:
RAILS_ENV: test
DATABASE_HOST: localhost
DATABASE_USER: postgres
DATABASE_PASSWORD: postgres
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .tool-versions
cache: yarn
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Precompile assets
run: bin/rails assets:precompile
- name: Setup parallel database
run: |
bin/rails parallel:create
bin/rails parallel:load_schema
- name: Run tests
run: bin/rails parallel:spec
- name: Run tests tagged for local_users
run: bundle exec rspec -t local_users
env:
MAVIS__CIS2__ENABLED: false
seeds:
name: Seeds
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17.2
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5432:5432
env:
RAILS_ENV: development
DATABASE_URL: postgres://postgres:postgres@localhost:5432/manage_vaccinations_development
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .tool-versions
cache: yarn
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Check seeds run
run: bin/rails db:prepare
jest:
name: Jest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version-file: .tool-versions
cache: yarn
- run: yarn install --immutable --immutable-cache --check-cache
- run: yarn test