-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
50 lines (43 loc) · 853 Bytes
/
Copy path.gitlab-ci.yml
File metadata and controls
50 lines (43 loc) · 853 Bytes
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
default:
image: python:3.11
services:
- name: postgres:15
alias: db
variables:
POSTGRES_DB: job_db
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
DATABASE_URL: postgresql+psycopg2://postgres:postgres@db:5432/job_db
before_script:
- pip install -r requirements.txt
stages:
- test
cache:
paths:
- .cache/pip
alembic-check:
stage: test
script:
- alembic check
pytest:
stage: test
needs: ["alembic-check"]
script:
- pytest --cov=app --cov-report=xml
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
Check formatting:
stage: test
script:
- black --check app tests
Check imports:
stage: test
script:
- isort --check-only app tests
Lint with flake8:
stage: test
script:
- flake8 app tests