Skip to content

Fix tox -e build by pinning Python version (#51) #115

Fix tox -e build by pinning Python version (#51)

Fix tox -e build by pinning Python version (#51) #115

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install tox
- name: Lint via tox
run: |
tox -e lint
test-py3:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install tox
- name: Test via tox
run: |
tox -e py3
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
env_vars: PYTHON
files: coverage.xml
flags: unittests
verbose: true
test-pypy3:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["pypy-3.7", "pypy-3.8", "pypy-3.9"]
steps:
- uses: actions/checkout@v2
- name: Set up Pypy ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install tox
- name: Test via tox
run: |
tox -e pypy3