-
Notifications
You must be signed in to change notification settings - Fork 62
142 lines (141 loc) · 3.8 KB
/
app.yml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: App
on:
pull_request:
branches:
- main
- 'release-*'
- develop_react_upgrade
workflow_dispatch:
jobs:
server-test:
name: RSpec Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14.15
env:
POSTGRES_DB: primero_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgrespassword
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Build/Run Solr
run: |
cd docker && ./build.sh solr
docker run -v solr_cores:/var/solr primeroims/solr:latest make-primero-core.sh primero-test
docker images
docker run -d -p 8983:8983 -v solr_cores:/var/solr --name=primero_solr_1 primeroims/solr:latest
docker ps
- name: Server tests
run: ./bin/run_server_tests.sh github-actions
shell: bash
# Running front-end mocha test in batches. Running on single process causes test
# to run out of resources. This causes a few test to randomly timeout.
client-test-1:
name: Client Test (Batch 1)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Run client tests
run: |
npm ci
npm run test:batch:1
client-test-2:
name: Client Test (Batch 2)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Run client tests
run: |
npm ci
npm run test:batch:2
client-test-3:
name: Client Test (Batch 3)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Run client tests
run: |
npm ci
npm run test:batch:3
client-test-4:
name: Client Test (Batch 4)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Run client tests
run: |
npm ci
npm run test:batch:4
client-test-5:
name: Client Test (Batch 5)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Run client tests
run: |
npm ci
npm run test:batch:5
client-test-new:
name: Client Test (New)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Run client tests
run: |
npm ci
npm run test:new -- --maxWorkers=2
client-lint:
name: Client Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Run client linter
run: |
npm ci
npm run lint