Newer
Older
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
stages:
- quality
- test
- build
ruff:
stage: quality
image: python:3.12
script:
- pip install ruff
- ruff check
black:
stage: quality
image: python:3.12
script:
- pip install black
- black .
test:
stage: test
image: python:3.12
coverage: /TOTAL.+?(\d+%)/
script:
- pip install --no-cache -r requirements.txt -r requirements-test.txt
- pytest --cov --cov-report term-missing
build:
stage: build
image: quay.io/podman/stable:v4
rules:
- if: $CI_COMMIT_TAG
variables:
CONTAINER_IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
script:
- echo "$CI_REGISTRY_PASSWORD" | podman login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
- podman build -t $CONTAINER_IMAGE_NAME .
- podman push $CONTAINER_IMAGE_NAME