2021-01-27 05:11:27 +03:00
|
|
|
name: Tests and linters
|
|
|
|
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
test-on-different-versions:
|
|
|
|
name: Run tests
|
2021-03-03 16:28:10 +03:00
|
|
|
runs-on: ubuntu-18.04
|
2021-01-27 05:11:27 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-10-12 19:16:49 +03:00
|
|
|
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]
|
2021-01-27 05:11:27 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
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
|
|
|
|
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
- run: pip install tox cython
|
|
|
|
- run: make cythonize
|
|
|
|
- run: tox
|
|
|
|
env:
|
|
|
|
TOXENV: coveralls
|
|
|
|
|
|
|
|
linters:
|
|
|
|
name: Run linters
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
toxenv: [flake8, pydocstyle, mypy, pylint]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.9
|
|
|
|
- run: pip install tox
|
|
|
|
- run: tox
|
|
|
|
env:
|
|
|
|
TOXENV: ${{ matrix.toxenv }}
|