-
Notifications
You must be signed in to change notification settings - Fork 6
55 lines (41 loc) · 1.06 KB
/
pull-request-ci.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
51
52
53
54
name: CI for New Pull Requests
on:
pull_request:
branches:
- '*'
jobs:
test:
name: Run all tests
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: yarn clean install
run: yarn install --frozen-lockfile
- name: Typescript compiles
run: yarn build
- name: Eslint
run: yarn lint
continue-on-error: true
- name: database migration
run: npm run migration
env:
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/postgres
- name: run tests
run: yarn test