-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
67 lines (60 loc) · 1.55 KB
/
.gitlab-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
image: registry.gitlab.com/filipelbc/svelte-postgraphile-boilerplate/dev:latest
variables:
POSTGRES_PASSWORD: app_owner_password
POSTGRES_USER: app_owner
POSTGRES_DB: app
stages:
- lint
- test
- build
lint-client:
stage: lint
script:
- cd ./client && cp -r /cache/client/node_modules .
- npm install
- ../scripts/assert-no-diffs.sh ./package-lock.json
- npx prettier --check .
- npm run gen-graphql-sdk
- npm run check
artifacts:
paths:
- ./client/src/services/api/graphql-sdk.ts
build-client:
stage: build
script:
- cd ./client && cp -r /cache/client/node_modules .
- npm run build
dependencies:
- lint-client
artifacts:
paths:
- ./client/public/build/
lint-server:
stage: lint
script:
- cd ./server && cp -r /cache/server/node_modules .
- npm install
- ../scripts/assert-no-diffs.sh ./package-lock.json
- npx prettier --check .
lint-worker:
stage: lint
script:
- cd ./worker && cp -r /cache/worker/node_modules .
- npm install
- ../scripts/assert-no-diffs.sh ./package-lock.json
- npx prettier --check .
test-api:
services:
- name: registry.gitlab.com/filipelbc/svelte-postgraphile-boilerplate/postgres:latest
alias: postgres
stage: test
script:
- cd ./sql
- ./install-schema.sh
- cd ../worker && cp -r /cache/worker/node_modules .
- npm run migrate
- cd ../sql
- ./check-plpgsql.sh
- cd ../server && cp -r /cache/server/node_modules .
- npm run gen-schema
- ../scripts/assert-no-diffs.sh ./schema.graphql