-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
58 lines (52 loc) · 1.27 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
stages:
- test
- build
- package
.test_before_script:
before_script:
- apt-get update -qy
- apt-get install -y coinor-cbc
- apt-get install git
- pip install --upgrade pip
- pip install git+https://github.com/oemof/oemof-thermal.git
- pip install git+https://github.com/oemof/oemof-solph.git
- pip install -r requirements.txt
- pip install pytest
test_scripts:
stage: test
image: python:3.7
extends: .test_before_script
script:
- python -m pytest tests
pylint:
stage: test
image: python:3.7
script:
- pip install pylint --quiet
- pip install git+https://github.com/oemof/oemof-thermal.git
- pip install -r requirements.txt
- pylint mtress
allow_failure: true
build_pypi:
stage: build
image: python:3.7
script:
- pip install twine
- python setup.py sdist bdist_wheel
only:
- master
artifacts:
expire_in: 30 days
paths:
- dist/
package_pypi:
stage: package
image: python:3.7
only:
- master
script:
- echo "Project ID:"
- echo ${CI_PROJECT_ID}
- pip install twine
- TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url https://gitlab.com/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/*
when: manual