python-dependency-injector/.github/workflows/tests.yml

46 lines
1.2 KiB
YAML
Raw Normal View History

2021-01-26 01:11:34 +03:00
name: Tests
2021-01-26 01:59:42 +03:00
on: [push, workflow_dispatch]
2021-01-26 01:11:34 +03:00
jobs:
2021-01-26 01:53:53 +03:00
test-with-versions:
2021-01-26 01:11:34 +03:00
name: Run tests
runs-on: ubuntu-latest
2021-01-26 01:18:34 +03:00
strategy:
matrix:
2021-01-26 01:39:00 +03:00
python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, pypy2, pypy3]
2021-01-26 01:11:34 +03:00
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
2021-01-26 01:18:34 +03:00
python-version: ${{ matrix.python-version }}
2021-01-26 02:18:04 +03:00
- run: |
pip install tox
tox
env:
TOXENV: ${{ matrix.python-version }}
2021-01-26 01:53:53 +03:00
test-coverage:
2021-01-26 02:07:17 +03:00
name: Run tests with coverage
2021-01-26 01:53:53 +03:00
runs-on: ubuntu-latest
steps:
2021-01-26 02:34:48 +03:00
- name: Get the current branch name
shell: bash
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
id: branch-name
2021-01-26 01:53:53 +03:00
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.9
2021-01-26 02:42:11 +03:00
- run: pip install tox
- run: pip install cython
- run: make cythonize
2021-01-26 02:18:04 +03:00
env:
DEPENDENCY_INJECTOR_DEBUG_MODE: 1
2021-01-26 02:42:11 +03:00
- run: tox
env:
TOXENV: coveralls
2021-01-26 02:34:48 +03:00
COVERALLS_GIT_BRANCH: ${{ steps.branch-name.outputs.branch }}
2021-01-26 02:42:11 +03:00
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}