2021-01-27 05:11:27 +03:00
|
|
|
name: Tests and linters
|
|
|
|
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
2022-12-19 05:09:14 +03:00
|
|
|
tests-on-legacy-versions:
|
|
|
|
name: Run tests on legacy versions
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-08-07 05:41:24 +03:00
|
|
|
python-version: [3.7]
|
2022-12-19 05:09:14 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- run: pip install tox
|
|
|
|
- run: tox
|
|
|
|
env:
|
|
|
|
TOXENV: ${{ matrix.python-version }}
|
|
|
|
|
2021-01-27 05:11:27 +03:00
|
|
|
test-on-different-versions:
|
|
|
|
name: Run tests
|
2021-10-20 19:10:05 +03:00
|
|
|
runs-on: ubuntu-latest
|
2021-01-27 05:11:27 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-08-07 05:41:24 +03:00
|
|
|
python-version: [3.8, 3.9, "3.10", 3.11, 3.12]
|
2021-01-27 05:11:27 +03:00
|
|
|
steps:
|
2022-12-19 05:09:14 +03:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-python@v4
|
2021-01-27 05:11:27 +03:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- run: pip install tox
|
|
|
|
- run: tox
|
|
|
|
env:
|
|
|
|
TOXENV: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
test-coverage:
|
|
|
|
name: Run tests with coverage
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
2024-11-04 04:48:40 +03:00
|
|
|
DEPENDENCY_INJECTOR_DEBUG_MODE: 1
|
|
|
|
PIP_VERBOSE: 1
|
2021-01-27 05:11:27 +03:00
|
|
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
steps:
|
2022-12-19 05:09:14 +03:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-python@v4
|
2021-01-27 05:11:27 +03:00
|
|
|
with:
|
2024-08-07 05:41:24 +03:00
|
|
|
python-version: 3.12
|
2024-11-04 04:48:40 +03:00
|
|
|
- run: pip install tox 'cython>=3,<4'
|
2021-01-27 05:11:27 +03:00
|
|
|
- run: make cythonize
|
2024-11-04 04:48:40 +03:00
|
|
|
- run: tox -vv
|
2021-01-27 05:11:27 +03:00
|
|
|
env:
|
|
|
|
TOXENV: coveralls
|
|
|
|
|
|
|
|
linters:
|
|
|
|
name: Run linters
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
toxenv: [flake8, pydocstyle, mypy, pylint]
|
|
|
|
steps:
|
2022-12-19 05:09:14 +03:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-python@v4
|
2021-01-27 05:11:27 +03:00
|
|
|
with:
|
2024-08-07 05:41:24 +03:00
|
|
|
python-version: 3.12
|
2021-01-27 05:11:27 +03:00
|
|
|
- run: pip install tox
|
|
|
|
- run: tox
|
|
|
|
env:
|
|
|
|
TOXENV: ${{ matrix.toxenv }}
|