-
Notifications
You must be signed in to change notification settings - Fork 31
88 lines (70 loc) · 1.9 KB
/
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Node CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
env:
TERM: xterm
FORCE_COLOR: 1
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18
- name: Install
run: yarn --immutable --ignore-engines
- name: Check Code Format
run: yarn format:check
- name: Lint Code
run: yarn lint
- name: Typecheck
run: yarn typecheck
test:
runs-on: ubuntu-latest
env:
CI: true
PGVERSION: ${{ matrix.postgres-version}}
TEST_DATABASE_URL: postgres://postgres:[email protected]:5432/graphile_test_c
TERM: xterm
FORCE_COLOR: 1
strategy:
fail-fast: false
matrix:
postgres-version:
- 11
- 12
- 13
- 14
- 15
node-version:
- 16.x
- 18.x
services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "0.0.0.0:5432:5432"
# needed because the postgres container does not provide a healthcheck
options:
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5 --name postgres
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Configure PostgreSQL
run: |
cat .github/workflows/ci/docker-entrypoint-initdb.d/010-setup.sh | docker exec -i postgres bash
- name: Install
run: yarn --immutable --ignore-engines
- name: Test
run: yarn test