Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grizz committed Apr 29, 2024
1 parent 0ae1383 commit 8173ac3
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 5 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: tests

on: [push, pull_request]

jobs:

linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install virtualenv from poetry
uses: 20c/workflows/poetry@v1
- name: Run linters
run: |
poetry run pre-commit run --all-files
test:
needs: linting
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install virtualenv from poetry
uses: 20c/workflows/poetry@v1
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: poetry run tox -e py
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
5 changes: 2 additions & 3 deletions Ctl/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
codecov>=2.0.5
coverage>=4.1
pytest-cov>=2.3, <3
tox>=2.3.1, <4
pytest-cov>=2.3
tox>=4
19 changes: 18 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ coverage = ">=5.3"
pytest = ">=6.1.2"
pytest-cov = ">=2.10.1"
tox = ">=4"
tox-gh-actions = ">2"

# linting
ruff = ">=0.1"
Expand Down
13 changes: 12 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@
envlist = py{38,39,310,311,312}-pytest{6,7,8}


[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312


[testenv]
allowlist_externals =
pytest
deps =
pytest3: pytest>=3, <4
pytest4: pytest>=4, <5
Expand All @@ -18,4 +29,4 @@ commands =


[pytest]
norecursedirs = Ctl data gen .tox
norecursedirs = data gen .tox .venv

0 comments on commit 8173ac3

Please sign in to comment.