forked from datthinh1801/cicflowmeter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
95 lines (84 loc) · 1.67 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
image: python:3.7
stages:
- test
- build
- release
- integration test
- deploy
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script:
- pip install -U pip
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install tox twine
cache:
key: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
paths:
- .cache/
- .tox/
- venv/
linter:
stage: test
allow_failure: true
script:
- tox -e linter
test:
stage: test
script:
- tox -e py37
artifacts:
when: always
reports:
junit: report.xml
build:
stage: build
script:
- make build
- tox -e pypi
- make install
- cicflowmeter -h
needs: [test]
artifacts:
paths:
- dist/
release:
stage: release
script:
- twine upload dist/* -u "__token__" -p $TWINE_TOKEN
when: manual
artifacts:
paths:
- dist
only:
- tags
# integrate:
# stage: integration test
# script: echo test
# needs:
# - linter
# - test
# - build
# deploy_staging:
# stage: deploy
# script: echo "Deploy here"
# environment:
# name: staging
# url: https://beta.example.com
# needs: [integrate]
# deploy_production:
# stage: deploy
# script: echo "Deploy here"
# environment:
# name: production
# url: https://example.com
# when: manual
# needs: [integrate]
# only:
# - master
# notification:
# stage: .post
# script:
# - curl -X POST $ZULIP_URL -u $ZULIP_EMAIL:$ZULIP_API -d "type=private" -d "to=$ZULIP_EMAIL" -d "content=$CI_COMMIT_DESCRIPTION - passed the tests."
# needs: [integrate]