-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (65 loc) · 1.96 KB
/
test.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
name: Test
on:
push:
branches: [main]
pull_request:
jobs:
target_node:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20.17.0
- name: Install dependencies
run: npm ci
- name: Run build
run: npm run build
- name: Run all tests (without coverage)
run: npm run test:ci -- --coverage=false
env:
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: postgres
AUTH_SERVER_ISSUER: https://totally-fake-server-name/realms/pdc
OPENAPI_DOCS_AUTH_CLIENT_ID: pdc-fake-client-id
S3_ACCESS_KEY_ID: fake-access-key-id
S3_ACCESS_SECRET: fake-access-key-secret
S3_BUCKET: fake-s3-bucket
S3_ENDPOINT: https://fake-s3-endpoint
S3_PATH_STYLE: false
S3_REGION: fake-s3-region
- name: Run all tests (with coverage)
run: npm run test:ci
env:
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
PGPASSWORD: postgres
AUTH_SERVER_ISSUER: https://totally-fake-server-name/realms/pdc
OPENAPI_DOCS_AUTH_CLIENT_ID: pdc-fake-client-id
S3_ACCESS_KEY_ID: fake-access-key-id
S3_ACCESS_SECRET: fake-access-key-secret
S3_BUCKET: fake-s3-bucket
S3_ENDPOINT: https://fake-s3-endpoint
S3_PATH_STYLE: false
S3_REGION: fake-s3-region
- name: Upload test coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}