-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
41 lines (36 loc) · 1.02 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
image: python:3.13
stages:
- test
- build
lint:
stage: test
before_script:
- pip install -U pip tox
# It is unclear why, but gitlab-ci pip installs a very old poetry.
# Directly invoking the official installer gets a modern version.
- curl -sSL https://install.python-poetry.org | python3 -
- export PATH="/root/.local/bin:$PATH"
script: tox -elint
unit tests:
stage: test
before_script:
- pip install -U pip tox codecov
# It is unclear why, but gitlab-ci pip installs a very old poetry.
# Directly invoking the official installer gets a modern version.
- curl -sSL https://install.python-poetry.org | python3 -
- export PATH="/root/.local/bin:$PATH"
script:
- tox -epy313
- codecov
docker build:
stage: build
image: docker
services:
- docker:dind
variables:
DOCKER_DRIVER: overlay2
script:
- docker build -t ${CI_REGISTRY_IMAGE}:latest -f ./compose/django/Dockerfile .
include:
- template: SAST.gitlab-ci.yml
# - template: License-Scanning.gitlab-ci.yml