-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
75 lines (63 loc) · 1.4 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
default:
image: $CI_REGISTRY/atteq/z-service-layer/zsl/tox-env@sha256:b73bdde18840315fc1ac8e03ed7d1d46a0eced86bc527208be30ac65b7ab7243
stages:
- test
- docs
- mirror
- build
- deploy
test-check:
stage: test
script:
- tox -v -e check
test-py38-nocov:
stage: test
script:
- tox -v -e 3.8-nocov
test-py38-cover:
stage: test
script:
- tox -v -e 3.8-cover
test-py310-nocov:
stage: test
script:
- tox -v -e 3.10-nocov
test-py311-nocov:
stage: test
script:
- tox -v -e 3.11-nocov
docs:
stage: docs
script: tox -v -e docs
mirror-to-github:
stage: mirror
script:
# Set up GitHub details
- git config --global user.email "[email protected]"
- git config --global user.name "Atteq"
# Add GitHub as a remote using the access token and push
- git remote add github https://x-access-token:[email protected]/AtteqCom/zsl.git || true
- git push github HEAD:master --tags
rules:
# Runs for master branch
- if: '$CI_COMMIT_REF_NAME == "master"'
# Runs for tags with the desired format
- if: '$CI_COMMIT_REF_NAME =~ /^\d+\.\d+\.\d+$/'
build:
stage: build
script: python3 setup.py sdist bdist_wheel
only:
- tags
except:
- branches
artifacts:
paths:
- dist/*
expire_in: 1 week
deploy:
stage: deploy
script: twine upload --non-interactive dist/*
only:
- tags
except:
- branches