mirror of
https://github.com/ets-labs/python-dependency-injector.git
synced 2024-11-24 10:34:01 +03:00
c92129dcb0
* Update tests pipeline and setup.py * Update tox coverage command * Add setuptools to the dev requirements file * Enforce coverage version in tox * Leave coveralls CI/CD job on Python 3.12 because coveralls 4.0.1 doesn't support Python 3.13 * Update changelog and publishing jobs
73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
name: Tests and linters
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
jobs:
|
|
|
|
tests-on-legacy-versions:
|
|
name: Run tests on legacy versions
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.7]
|
|
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 }}
|
|
|
|
test-on-different-versions:
|
|
name: Run tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.8, 3.9, "3.10", 3.11, 3.12, 3.13]
|
|
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 }}
|
|
|
|
test-coverage:
|
|
name: Run tests with coverage
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
DEPENDENCY_INJECTOR_DEBUG_MODE: 1
|
|
PIP_VERBOSE: 1
|
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.12
|
|
- run: pip install tox 'cython>=3,<4'
|
|
- run: make cythonize
|
|
- run: tox -vv
|
|
env:
|
|
TOXENV: coveralls
|
|
|
|
linters:
|
|
name: Run linters
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
toxenv: [flake8, pydocstyle, mypy, pylint]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.13
|
|
- run: pip install tox
|
|
- run: tox
|
|
env:
|
|
TOXENV: ${{ matrix.toxenv }}
|