-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
54 lines (48 loc) · 1.12 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
stages:
- test
- deploy
services:
- postgres:latest
variables:
POSTGRES_DB: plana_test
POSTGRES_USER: plana
POSTGRES_PASSWORD: plana
DJANGO_SETTINGS_MODULE: plana.settings.unittest
PYTHON_VERSION: "3.9"
before_script:
- apt-get update && apt-get install -y age
unittest:
stage: test
tags:
- python3.9
script:
- apt-get update && apt-get install -y libpango-1.0-0 libpangoft2-1.0-0
- pip3 install -r requirements/dev.txt
- python manage.py generate_jwt_keys
- touch keys/jwt-public-key.pem
- touch keys/jwt-private-key.pem
- python manage.py generate_age_keys
- touch keys/age-public-key.key
- touch keys/age-private-key.key
- tox
coverage: '/^TOTAL.*\s+(\d+\%)$/'
include:
- project: docker/template
file: python-licenses.gitlab-ci.yml
pages:
stage: deploy
image: registry.gitlab.com/pages/hugo:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- cd docs
- hugo
- cp -r public ..
tags:
- cluster
artifacts:
paths:
- public
rules:
- if: '$CI_COMMIT_REF_NAME == "develop"'
- if: '$CI_COMMIT_REF_NAME == "main"'