-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (76 loc) · 2.27 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
89
90
91
92
93
94
name: CI
on: [push]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Build Docker image
run: docker build -t title .
ci:
runs-on: ubuntu-latest
container: node:15
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: graphql-boilerplate-ci
POSTGRES_USER: graphql-boilerplate-ci
POSTGRES_DB: graphql-boilerplate-ci
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: npm ci
- name: Generate codegen
run: npm run codegen
- name: Schema Scalars validation
run: npm run validate-schema:scalars
- name: Schema Build validation
run: npm run validate-schema:build
- name: Typecheck
run: npm run typescript-check --noEmit
- name: Lint
run: npm run lint
- name: Database Migration Latest
run: npm run database:migrate:latest
env:
DATABASE_TYPE: pg
DATABASE_HOST: postgres
DATABASE_USER: graphql-boilerplate-ci
DATABASE_PORT: 5432
DATABASE_PASSWORD: graphql-boilerplate-ci
DATABASE_NAME: graphql-boilerplate-ci
- name: Database Seed
run: npm run seed
env:
DATABASE_TYPE: pg
DATABASE_HOST: postgres
DATABASE_USER: graphql-boilerplate-ci
DATABASE_PORT: 5432
DATABASE_PASSWORD: graphql-boilerplate-ci
DATABASE_NAME: graphql-boilerplate-ci
- name: Database Migration Rollback
run: npm run database:migrate:rollback
env:
DATABASE_TYPE: pg
DATABASE_HOST: postgres
DATABASE_USER: graphql-boilerplate-ci
DATABASE_PORT: 5432
DATABASE_PASSWORD: graphql-boilerplate-ci
DATABASE_NAME: graphql-boilerplate-ci
- name: Tests
run: npm run test
env:
DATABASE_USER: graphql-boilerplate-ci
DATABASE_PORT: 5432
DATABASE_HOST: postgres
DATABASE_PASSWORD: graphql-boilerplate-ci
DATABASE_NAME: graphql-boilerplate-ci
- name: Check for non generated files
run: git diff --exit-code