This commit is contained in:
parent
435946f769
commit
e4b741df05
2 changed files with 17 additions and 2 deletions
16
.drone.yml
16
.drone.yml
|
|
@ -13,7 +13,7 @@ environment:
|
||||||
PRE_COMMIT_HOME: /drone/src/.cache/.pre-commit
|
PRE_COMMIT_HOME: /drone/src/.cache/.pre-commit
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: restore cache
|
- name: restore_cache
|
||||||
image: meltwater/drone-cache
|
image: meltwater/drone-cache
|
||||||
pull: true
|
pull: true
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -31,24 +31,30 @@ steps:
|
||||||
- .venv
|
- .venv
|
||||||
- .cache/.pre-commit
|
- .cache/.pre-commit
|
||||||
|
|
||||||
- name: install dependencies
|
- name: install_deps
|
||||||
pull: true
|
pull: true
|
||||||
image: git.roboces.dev/catalin/poetry:beta
|
image: git.roboces.dev/catalin/poetry:beta
|
||||||
commands:
|
commands:
|
||||||
- poetry config virtualenvs.in-project 1
|
- poetry config virtualenvs.in-project 1
|
||||||
- poetry install --with linters,test
|
- poetry install --with linters,test
|
||||||
|
depends_on:
|
||||||
|
- restore_cache
|
||||||
|
|
||||||
- name: lint
|
- name: lint
|
||||||
pull: true
|
pull: true
|
||||||
image: git.roboces.dev/catalin/poetry:beta
|
image: git.roboces.dev/catalin/poetry:beta
|
||||||
commands:
|
commands:
|
||||||
- .venv/bin/pre-commit run --all-files --color always
|
- .venv/bin/pre-commit run --all-files --color always
|
||||||
|
depends_on:
|
||||||
|
- install_deps
|
||||||
|
|
||||||
- name: tests
|
- name: tests
|
||||||
pull: true
|
pull: true
|
||||||
image: git.roboces.dev/catalin/poetry:beta
|
image: git.roboces.dev/catalin/poetry:beta
|
||||||
commands:
|
commands:
|
||||||
- .venv/bin/pytest
|
- .venv/bin/pytest
|
||||||
|
depends_on:
|
||||||
|
- install_deps
|
||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
pull: true
|
pull: true
|
||||||
|
|
@ -61,6 +67,9 @@ steps:
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
- refs/tags/v*
|
- refs/tags/v*
|
||||||
|
depends_on:
|
||||||
|
- lint
|
||||||
|
- tests
|
||||||
|
|
||||||
- name: rebuild cache
|
- name: rebuild cache
|
||||||
image: meltwater/drone-cache
|
image: meltwater/drone-cache
|
||||||
|
|
@ -83,3 +92,6 @@ steps:
|
||||||
status:
|
status:
|
||||||
- failure
|
- failure
|
||||||
- success
|
- success
|
||||||
|
depends_on:
|
||||||
|
- lint
|
||||||
|
- tests
|
||||||
|
|
|
||||||
|
|
@ -32,3 +32,6 @@ build-backend = "poetry.core.masonry.api"
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
addopts = ['--maxfail=1', '-rf', "--cov=halig", '--junitxml=report.xml']
|
addopts = ['--maxfail=1', '-rf', "--cov=halig", '--junitxml=report.xml']
|
||||||
|
|
||||||
|
[tool.coverage.run]
|
||||||
|
omit = [".venv/**"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue