-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1.05 KB
/
run-tests.yaml
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
name: Node.js CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
services:
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
postgres:
image: postgres:latest
env:
POSTGRES_DB: sfc_unit_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run unit tests
run:
yarn test:unit
- name: Run integration tests
env:
REDIS_URL: redis://redis:6379/0
run:
yarn test:integration
- name: Check linting
run:
yarn test:unit