-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (87 loc) · 2.3 KB
/
test-on-pullrequest.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
name: Run tests on pull requests
on: pull_request
jobs:
lint:
runs-on: ubuntu-latest
container: node:12
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install deps
run: npm ci --production=false
- name: Lint
run: npm run lint
test-functional:
runs-on: ubuntu-latest
container: node:12
services:
postgres:
image: postgres
env:
POSTGRES_USER: reki
POSTGRES_PASSWORD: reki
POSTGRES_DB: reki
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install deps
run: npm ci --production=false
- name: Functional tests
run: npm run test-functional
env:
TEST_DATABASE_URL: postgres://reki:reki@postgres/reki
test-integration:
runs-on: ubuntu-latest
container: node:12
services:
postgres:
image: postgres
env:
POSTGRES_USER: reki
POSTGRES_PASSWORD: reki
POSTGRES_DB: reki
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install deps
run: npm ci --production=false
- name: Integration tests
run: npm run test-integration
env:
TEST_DATABASE_URL: postgres://reki:reki@postgres/reki
test-e2e:
runs-on: ubuntu-latest
container: cypress/browsers:node12.18.0-chrome83-ff77
services:
postgres:
image: postgres
env:
POSTGRES_USER: reki
POSTGRES_PASSWORD: reki
POSTGRES_DB: reki
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install deps
run: npm ci --production=false
- name: End-to-end tests
uses: cypress-io/github-action@v2
with:
command: npm run test-e2e
env:
TEST_DATABASE_URL: postgres://reki:reki@postgres/reki