-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (44 loc) 路 1.04 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
42
43
44
45
46
47
48
49
50
51
52
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python/tags/
stages:
- test
default:
before_script:
- make poetry-download
- export PATH="/root/.local/bin:$PATH"
- python3 -m venv .venv
- source .venv/bin/activate
- make install
cache:
key: venv-$CI_COMMIT_REF_NAME-$CI_JOB_STAGE-$CI_COMMIT_SHA
paths:
- $CI_PROJECT_DIR/.cache/pip
.default_scripts: &default_scripts
- make check-codestyle
- make test
- make check-safety
workflow:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
test-py38:
stage: test
image: python:3.8
script:
- *default_scripts
test-py39:
stage: test
image: python:3.9
script:
- *default_scripts
test-py310:
stage: test
image: python:3.10
script:
- *default_scripts
test-py311:
stage: test
image: python:3.11
script:
- *default_scripts