forked from Deltares/GEOLib-Plus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
76 lines (74 loc) · 3.18 KB
/
bitbucket-pipelines.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
# This is a sample build configuration for Python.
# Check our guides at https://confluence.atlassian.com/x/x4UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: python:3.7.7
clone:
lfs: true
pipelines:
default:
- step:
name: Install requirements.
caches:
- pip
script: # Modify the commands below to build your repository.
- pip install -r requirements.txt
- pip install tests/test_files/geolib_package/geolib-0.1.5-py3-none-any.whl
- parallel:
- step: # Run unittest
name: Run unittest and codecoverage.
caches:
- pip
script:
- pip install -r requirements.txt
- pip install tests/test_files/geolib_package/geolib-0.1.5-py3-none-any.whl
- pytest -v --cov=geolib_plus --cov-report xml:test-reports/coverage.xml --junitxml=test-reports/report_unit.xml tests/ -m "unittest and not workinprogress"
- step: # Run integrationtest
name: Run integrationtest.
caches:
- pip
script:
- pip install -r requirements.txt
- pip install tests/test_files/geolib_package/geolib-0.1.5-py3-none-any.whl
- pytest -v --junitxml=test-reports/report_integration.xml tests/ -m "integrationtest and not workinprogress"
- step: # Run systemtest
name: Run systemtest.
caches:
- pip
script:
- pip install -r requirements.txt
- pip install tests/test_files/geolib_package/geolib-0.1.5-py3-none-any.whl
- pytest -v --junitxml=test-reports/report_system.xml tests/ -m "systemtest and not workinprogress"
branches:
master:
- step: # Install packages.
name: Install packages.
caches:
- pip
script:
- pip install -r requirements.txt
- pip install tests/test_files/geolib_package/geolib-0.1.5-py3-none-any.whl
- parallel:
- step: # Run tests with code coverage for unittest
name: Run tests and code coverage.
caches:
- pip
script:
- pip install -r requirements.txt
- pip install tests/test_files/geolib_package/geolib-0.1.5-py3-none-any.whl
- pytest -v --cov=geolib_plus --cov-report xml:test-reports/coverage.xml --junitxml=test-reports/report.xml tests/ -m "not workinprogress"
- step: # create documentation
name: Create documentation.
caches:
- pip
script:
- pip install -r requirements.txt
- cd docs && make html
- apt-get update && apt-get --yes install zip
- cd build/html && zip -r docs.zip *
# - pipe: atlassian/bitbucket-upload-file:0.1.3
# variables:
# BITBUCKET_USERNAME: $BITBUCKET_USERNAME
# BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
# FILENAME: "docs.zip"