-
Notifications
You must be signed in to change notification settings - Fork 74
50 lines (43 loc) · 1.03 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
name: Test
on: ['push', 'pull_request']
jobs:
code:
name: Test code
runs-on: ubuntu-latest
container: node:lts
services:
database:
image: postgres:13
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: docker
POSTGRES_DB: umbriel
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- 6379:6379
options: >-
--entrypoint redis-server
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Run Jest
run: yarn test
env:
DATABASE_NAME: umbriel
DATABASE_USER: postgres
DATABASE_PASS: docker
DATABASE_PORT: 5432
DATABASE_HOST: database
REDIS_HOST: redis