-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
41 lines (38 loc) · 983 Bytes
/
.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
# see: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
variables:
POSTGRES_DB: "keystone"
POSTGRES_USER: "keystone"
POSTGRES_PASSWORD: "keystone"
KEYSTONE_POSTGRES_HOST: "postgres"
KEYSTONE_POSTGRES_PORT: 5432
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
ENV: CI # run Makefile in CI mode
PYTEST_REPORT: pytest.xml
PYLINT_REPORT: pylint.json
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- .cache/pip
- venv/
test-py:
stage: test
image: python:3.11
services:
- postgres:14
# job can be preempted by subsequent requests to re-run
# https://git.archive.org/help/ci/yaml/README.md#interruptible
interruptible: true
script:
- python --version
- make venv
- make install
- make test
- make lint
- make ck-format
artifacts:
reports:
junit: $PYTEST_REPORT
codequality: $PYLINT_REPORT
coverage_report:
coverage_format: cobertura
path: coverage.xml