diff --git a/.drone.yml b/.drone.yml index 314320f..a7cda8e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,7 @@ environment: PRE_COMMIT_HOME: /drone/src/.cache/.pre-commit steps: - - name: restore cache + - name: restore_cache image: meltwater/drone-cache pull: true environment: @@ -31,24 +31,30 @@ steps: - .venv - .cache/.pre-commit - - name: install dependencies + - name: install_deps pull: true image: git.roboces.dev/catalin/poetry:beta commands: - poetry config virtualenvs.in-project 1 - poetry install --with linters,test + depends_on: + - restore_cache - name: lint pull: true image: git.roboces.dev/catalin/poetry:beta commands: - .venv/bin/pre-commit run --all-files --color always + depends_on: + - install_deps - name: tests pull: true image: git.roboces.dev/catalin/poetry:beta commands: - .venv/bin/pytest + depends_on: + - install_deps - name: deploy pull: true @@ -61,6 +67,9 @@ steps: when: ref: - refs/tags/v* + depends_on: + - lint + - tests - name: rebuild cache image: meltwater/drone-cache @@ -83,3 +92,6 @@ steps: status: - failure - success + depends_on: + - lint + - tests diff --git a/pyproject.toml b/pyproject.toml index 826e406..9f3ac63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,3 +32,6 @@ build-backend = "poetry.core.masonry.api" [tool.pytest.ini_options] addopts = ['--maxfail=1', '-rf', "--cov=halig", '--junitxml=report.xml'] + +[tool.coverage.run] +omit = [".venv/**"]