-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.16 KB
/
build-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
name: build-test
on:
pull_request:
push:
branches:
- main
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}
DATABASE_URL: postgresql://nxpm:nxpm@localhost:5432/nxpm?schema=public
JWT_SECRET: NxpmDotDevJwtSecret
jobs:
build:
services:
postgres:
image: postgres:12
env:
POSTGRES_DB: nxpm
POSTGRES_USER: nxpm
POSTGRES_PASSWORD: nxpm
ports: ['5432:5432']
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
node-version: [14.x]
operating-system: [ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Setup node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn format:check
- run: yarn test:ci