This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
.gitlab-ci.yml
80 lines (74 loc) · 1.7 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
68
69
70
71
72
73
74
75
76
77
78
79
80
stages:
- renovate
- documentation
- test
- build
- integration
- release
- deploy
include:
- local: /gitlab-ci/documentation.yml
- local: /gitlab-ci/renovate.yml
- local: /gitlab-ci/aws/cdk.yml
- local: /gitlab-ci/aws/dev.yml
- local: /gitlab-ci/aws/app.yml
.Pytest:
image: python:3.8
stage: test
services:
- postgres:11.5
- redis:5.0
variables:
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/postgres"
DJANGO_SETTINGS_MODULE: "backend.settings.gitlab-ci"
SECRET_KEY: "secret"
STACK_NAME: "placeholder"
DEBUG: "True"
before_script:
- cd backend
- pip install -r requirements/test.txt
- pip install -r requirements/base.txt
script:
- flake8
- black -l 79 -S --check .
- pytest --cov
after_script:
- echo "Pytest tests complete"
coverage: "/TOTAL.+ ([0-9]{1,3}%)/"
.Jest:
image: node:12.19.0
stage: test
before_script:
- cd quasar
- npm install --progress=false
script:
- npm run lint
- npm run test
after_script:
- echo "Jest tests complete"
coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/'
# gitlab-runner exec docker "e2e cypress tests without docker-compose"
.e2e:
stage: integration
image: docker:19.03.13
only:
- master
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
services:
- docker:19.03.13-dind
before_script:
- apk add --update py-pip
- pip install docker-compose~=1.23.0
script:
- sh integration-tests.sh
artifacts:
paths:
- cypress/videos/
- tests/screenshots/
expire_in: 2 days
# # use this test with gitlab-runner locally
# .e2e-local:
# <<: *cypress
# image: localhost:5000/backend:latest