-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (70 loc) · 2.26 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
name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- run: npm run lint:eslint
- run: npm run lint:prettier
- run: npm run codegen
- run: npm run lint:graphql-schema-linter
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
env:
POSTGRES_USERNAME: user
POSTGRES_PASSWORD: pass
POSTGRES_DATABASE: test
NEO4J_URL: bolt://localhost:7687
NEO4J_USERNAME: neo4j
NEO4J_PASSWORD: password
services:
postgres:
image: postgres:15@sha256:79aff09d6a4051942be9f2b0288d15a1b23626f2e69200c2fceee4027c13374b
ports:
- 5432:5432
env:
POSTGRES_USER: ${{ env.POSTGRES_USERNAME }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_DB: ${{ env.POSTGRES_DATABASE }}
neo4j:
image: neo4j:5.14@sha256:677d3ad677cbf3993db10b60cf990b0df394687210df3f1ce124459ae8542e64
ports:
- 7687:7687
env:
NEO4J_AUTH: ${{ env.NEO4J_USERNAME }}/${{ env.NEO4J_PASSWORD }}
redis:
image: redis:7.2@sha256:2976bc0437deff693af2dcf081a1d1758de8b413e6de861151a5a136c25eb9e4
ports:
- 6379:6379
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- run: npm run codegen
- run: npm run prisma:client
- run: npm run buf:generate
- run: npm run typecheck
- run: npm run test
env:
PRISMA_DATABASE_URL: postgres://${{ env.POSTGRES_USERNAME }}:${{ env.POSTGRES_PASSWORD }}@localhost:5432/${{ env.POSTGRES_DATABASE }}
NEO4J_URL: ${{ env.NEO4J_URL }}
NEO4J_USERNAME: ${{ env.NEO4J_USERNAME }}
NEO4J_PASSWORD: ${{ env.NEO4J_PASSWORD }}
REDIS_URL: "redis://localhost:6379"