-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (47 loc) · 1.08 KB
/
unit-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
name: Unit Test
on:
workflow_dispatch:
push:
branches:
- main
paths:
- packages/**
- .github/workflows/unit-test.yml
- package-lock.json
pull_request:
paths:
- packages/**
- package-lock.json
jobs:
unit-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:alpine
env:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
redis:
image: redis:alpine
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Install
run: |
npm install -g npm@latest
npm install
- name: Lint
run: npm run lint
- name: Run Tests
run: npm run ci
env:
KNEX_CONNECTION_BASE: postgresql://postgres:postgres@localhost:5432
REDIS_CONNECTION_BASE: redis://localhost:6379
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOVTOKEN }}