[pre-commit.ci] pre-commit autoupdate #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tox tests | |
on: [push, pull_request] | |
jobs: | |
test: | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9, 3.8, 3.7, 3.6] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache pip | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ matrix.python-version }} | |
restore-keys: | | |
${{ runner.os }}-pip-${{ matrix.python-version }} | |
- name: Cache tox | |
uses: actions/cache@v1 | |
with: | |
path: .tox | |
key: ${{ runner.os }}-tox-${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }} | |
restore-keys: | | |
${{ runner.os }}-tox-${{ matrix.python-version }}- | |
- name: Install dependencies | |
run: | | |
sudo apt-get install gettext sqlite3 | |
python -m pip install --upgrade pip tox>=3.5 | |
- name: Test with tox | |
env: | |
TOX_ENV: py | |
COMMAND: coverage run | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_SERVICE_NAME: github | |
run: | | |
tox -e$TOX_ENV | |
.tox/$TOX_ENV/bin/coverage xml | |
.tox/$TOX_ENV/bin/coveralls | |
- uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
flags: unittests | |
file: ./coverage.xml | |
fail_ci_if_error: false |