This repository was archived by the owner on Feb 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.56 KB
/
test.yml
File metadata and controls
55 lines (51 loc) · 1.56 KB
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
name: Test
on:
push:
branches: [develop, master]
pull_request:
branches: [develop]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Use NodeJS v${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Dependency Check
run: npm run depcheck
- name: Build
run: npm run build
- name: ESlint
run: npm run lint
- name: Seed Database
run: npx ts-node scripts/seed.ts
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
- name: Tests
run: npm test
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/postgres
SESSION_SECRET: ${{ secrets.SESSION_SECRET }}
GOOGLE_OAUTH_CLIENT_ID: 425704804623-04q55nmf47je6ejqua6b252t5dtptkfr.apps.googleusercontent.com
GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}
GOOGLE_OAUTH_CALLBACK_URL: http://localhost:3000/auth/google/callback
PORT: 3000
- name: Upload Coverage Reports
run: bash <(curl -s https://codecov.io/bash)