Fake py 3.6 compat #228
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: Tests | |
on: [push, pull_request] | |
jobs: | |
run_tests: | |
name: ${{ matrix.title }} (Python ${{ matrix.python }} on ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
env: | |
tox: tox | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- title: Codestyle and Main Tests | |
os: ubuntu-20.04 | |
python: "3.10" | |
commands: | | |
$tox -e run-blackcheck,run-isortcheck | |
$tox -e py310-test | |
coverage: true | |
- title: Oldest supported Python | |
os: ubuntu-20.04 | |
python: "3.7" | |
commands: $tox -e py37-test | |
coverage: true | |
- title: Windows | |
os: windows-latest | |
python: "3.9" | |
commands: tox -e py39-test | |
coverage: false | |
- title: MacOS | |
os: macos-latest | |
python: "3.11" | |
commands: $tox -e py311-test | |
coverage: true | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
name: Install Python ${{ matrix.python }} | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install required apt packages | |
if: runner.os == 'Linux' | |
run: sudo apt-get install pandoc | |
- name: Install Tox | |
run: pip install tox | |
- name: Run Commands | |
run: ${{ matrix.commands }} | |
- name: Convert coverage data to xml | |
if: matrix.coverage == true | |
shell: bash | |
run: | | |
runenv=$(echo "${{ matrix.python }}" | sed 's/\([2-3]\)\.\([0-9]*\)/py\1\2-runcmd/') | |
$tox -e $runenv -- python -m coverage xml | |
- uses: codecov/codecov-action@v1 | |
if: matrix.coverage == true | |
with: | |
verbose: false |