-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
45 lines (38 loc) · 930 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
variables:
RUNNER_GENERATE_ARTIFACTS_METADATA: "true"
SLSA_PROVENANCE_SCHEMA_VERSION: "v1"
# Tell pip to cache its downloads in a dir under $CI_PROJECT_DIR, because
# paths outside $CI_PROJECT_DIR can't be cached.
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PYTHONDEVMODE: "1"
# Basic cache on the download dir.
cache:
paths:
- "$CI_PROJECT_DIR/.cache/pip"
default:
image: "python:3"
build:
stage: "build"
image: "python:3"
script:
- "pip install build"
- "python3 -m build"
artifacts:
paths:
- "dist/*"
expire_in: "1 week"
install:
stage: "test"
script:
- "pip install dist/*.whl"
check build:
stage: "test"
script:
- "pip install twine"
- "twine check dist/*"
test:
stage: "test"
image: "python:3"
script:
- "pip install pytest"
- "PYTHONPATH=. pytest"