Commit 3231c171 authored by Trond Aasan's avatar Trond Aasan
Browse files

Don't use `poetry` in `tox.ini`

parent 04dcbae0
......@@ -4,7 +4,13 @@ stages:
- test
before_script:
- pip install tox poetry
- pip install tox
pre-commit:
image: python
stage: test
script:
- tox -e pre-commit-ci
python38:
image: python:3.8
......@@ -17,6 +23,6 @@ python39:
stage: test
script:
- tox -e py39
# artifacts:
# reports:
# cobertura: coverage.xml
artifacts:
reports:
cobertura: coverage.xml
......@@ -9,17 +9,14 @@ repos:
- id: check-yaml
- id: check-added-large-files
- repo: local
- repo: https://github.com/psf/black
# Must match version in pyproject.toml
rev: 21.6b0
hooks:
- id: black
name: black
entry: poetry run black
language: python
language_version: python3
minimum_pre_commit_version: 2.9.2
require_serial: true
types_or: [ python, pyi ]
- repo: local
hooks:
- id: pytest
name: pytest
entry: poetry run pytest
......
......@@ -22,6 +22,7 @@ pytest = "^5.2"
black = { version = "21.6b0", allow-prereleases = true }
pytest-black = "^0.3.12"
pre-commit = "^2.13.0"
coverage = "^5.5"
[build-system]
requires = ["poetry-core>=1.0.0"]
......
[tox]
isolated_build = true
envlist = py3{8,9}
envlist = py3{8,9},pre-commit
# We want to run all pre-commit hooks when we run tox
[testenv:pre-commit]
deps =
pre-commit
pytest
commands = pre-commit run --all-files --show-diff-on-failure
# We skip the pytest hook in CI as pytest runs in the other environments
[testenv:pre-commit-ci]
deps = pre-commit
setenv =
SKIP=pytest
commands = {[testenv:pre-commit]commands}
[testenv]
whitelist_externals = poetry
skip_install = True
deps =
coverage
pytest
commands =
poetry install -v
poetry run pre-commit run --all
coverage erase
coverage run --branch --source=bottint_tree -m pytest
coverage xml
coverage report
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment