-
Notifications
You must be signed in to change notification settings - Fork 16
89 lines (84 loc) · 2.62 KB
/
test.yml
File metadata and controls
89 lines (84 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Test
on:
pull_request:
workflow_call:
permissions: {}
jobs:
rspec:
name: RSpec
runs-on: ubuntu-latest
services:
postgresql:
image: postgis/postgis:17-master
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .tool-versions
cache: yarn
- uses: ruby/setup-ruby@0cb964fd540e0a24c900370abf38a33466142735 # v1.305.0
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:
postgresql:
image: postgis/postgis:17-master
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: >-
postgis://postgres:postgres@localhost:5432/manage_vaccinations_development
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .tool-versions
cache: yarn
- uses: ruby/setup-ruby@0cb964fd540e0a24c900370abf38a33466142735 # v1.305.0
with:
bundler-cache: true
- name: Run seeds
run: bin/rails db:prepare
jest:
name: Jest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: .tool-versions
cache: yarn
- name: Install dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Run tests
run: yarn test