-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
88 lines (78 loc) · 1.62 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
88 lines (78 loc) · 1.62 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
image: python:3.12
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .cache/pip
- venv/
stages:
- test
- build
test-coverage:
stage: test
before_script:
- pip install --upgrade pip
- pip install -e .
- pip install coverage pytest
script:
- coverage run -m pytest
- coverage report
coverage: '/(?i)total.*? ([1-9]?\d|100)\%$/'
test-python-3.10:
image: python:3.10
stage: test
before_script:
- pip install --upgrade pip
- pip install -e .
- pip install pytest
script:
- pytest -v
test-python-3.11:
image: python:3.11
stage: test
before_script:
- pip install --upgrade pip
- pip install -e .
- pip install pytest
script:
- pytest -v
test-python-3.12:
image: python:3.12
stage: test
before_script:
- pip install --upgrade pip
- pip install -e .
- pip install pytest
script:
- pytest -v
test-python-3.13:
image: python:3.13
stage: test
before_script:
- pip install --upgrade pip
- pip install -e .
- pip install pytest
script:
- pytest -v
build:image:
stage: build
image: docker:latest
services:
- docker:dind
# rules:
# - if: $CI_COMMIT_BRANCH == "main"
# when: always
# - when: never
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- >-
docker build
--no-cache
--provenance=false
--tag $CI_REGISTRY_IMAGE:${CI_COMMIT_SHA}
--tag $CI_REGISTRY_IMAGE:latest
.
- docker push $CI_REGISTRY_IMAGE:${CI_COMMIT_SHA}
- docker push $CI_REGISTRY_IMAGE:latest