-
Notifications
You must be signed in to change notification settings - Fork 1
/
bitbucket-pipelines.yml
31 lines (27 loc) · 1.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
# Template python-build
# This template allows you to validate your python code.
# The workflow allows running tests and code linting on the default branch.
image: python:3.8
pipelines:
default:
- parallel:
- step:
name: Lint code
script:
# Enforce style consistency across Python projects https://flake8.pycqa.org/en/latest/manpage.html
- pip install flake8
- flake8 . --ignore E501,W503,W504,F841 --extend-exclude=dist,build --show-source --statistics
- step:
name: Test
caches:
- pip
script:
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- pip install pytest pytest-mock pytest-html pytest-cov
- pytest -v tests/* --junitxml=tests-reports/report.xml --html=tests-reports/report.html --cov-config=.coveragerc --cov-report xml:tests-reports/coverage.xml --cov-report html:tests-reports/coverage-html --cov=./ ./tests/
- step:
name: Deploy to test
deployment: test
# trigger: manual # Uncomment to make this a manual deployment.
script:
- echo "Deploying to test environment"