-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
55 lines (45 loc) · 944 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
image: python:3.11
variables:
PIP_CACHE_DIR: $CI_PROJECT_DIR/.cache/pip
POETRY_CACHE_DIR: $CI_PROJECT_DIR/.cache/pypoetry
POETRY_VIRTUALENVS_IN_PROJECT: 'true'
cache:
paths:
- .cache/pip
- .cache/pypoetry
- .venv
.poetry_setup: &poetry_setup
before_script:
- make develop
stages:
- lint
- test
- build
lint:
stage: lint
interruptible: true
<<: *poetry_setup
script:
- make lint-ci
test:
stage: test
interruptible: true
services:
- name: postgres:15
alias: db
variables:
POSTGRES_USER: pguser
POSTGRES_PASSWORD: pgpass
POSTGRES_DB: test_db
APP_DB_PG_DSN: postgresql+asyncpg://pguser:pgpass@db:5432/test_db
<<: *poetry_setup
script:
- make test-ci
coverage: /TOTAL.*\s+(\d+%)$/
artifacts:
expire_in: 1 week
reports:
coverage_report:
coverage_format: cobertura
path: coverage_report.xml
junit: junit_report.xml