forked from wlcrs/huawei-solar-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
58 lines (49 loc) · 882 Bytes
/
.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
53
54
55
56
57
58
---
image: python:3.11
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- venv/
before_script:
- python -V # Print out python version for debugging
- pip install twine tox ruff pytest build
linting:
stage: test
script:
- tox -e ruff,yamllint
build_staging:
stage: deploy
script:
- python -m build
except:
- tags
artifacts:
paths:
- dist/
deploy_production:
stage: deploy
variables:
TWINE_USERNAME: $PRODUCTION_USERNAME
TWINE_PASSWORD: $PRODUCTION_PASSWORD
script:
- python -m build
- twine upload dist/*
only:
- tags
artifacts:
paths:
- dist/
python310:
stage: test
image: python:3.10
script: tox -e py310
python311:
stage: test
image: python:3.11
script: tox -e py311
python312:
stage: test
image: python:3.12
script: tox -e py312