Skip to content

fix coverage to combine across all test runs #25

fix coverage to combine across all test runs

fix coverage to combine across all test runs #25

Workflow file for this run

name: Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Get environment name (Windows)
if: ${{ matrix.os == 'windows-latest' }}
run: python -c 'x = \"${{ matrix.python-version }}\"; print(\"toxenv=py\"+x[0]+x[2:])' | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Get environment name (Ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: python -c 'x = "${{ matrix.python-version }}"; print("toxenv=py"+x[0]+x[2:])' >> "$GITHUB_ENV"
- name: Get environment name (macOS)
if: ${{ matrix.os == 'macos-latest' }}
run: python -c 'x = "${{ matrix.python-version }}"; print("toxenv=py"+x[0]+x[2:])' >> "$GITHUB_ENV"
- name: Run tests with tox
run: tox -e ${{ env.toxenv }}