add test flags for os, python version

This commit is contained in:
yanyongyu 2022-01-13 18:11:00 +08:00
parent 8494768a89
commit 6713f4d9b0

View File

@ -6,14 +6,17 @@ on:
jobs:
test:
name: Run Pytest and Upload Coverage
name: Test Coverage
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
os: [ubuntu-latest, windows-latest, macos-latest]
fail-fast: false
env:
OS: ${{ matrix.os }}
PYTHON_VERSION: ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
@ -30,5 +33,6 @@ jobs:
- name: Upload coverage report
uses: codecov/codecov-action@v2
with:
env_vars: OS,PYTHON_VERSION
files: ./tests/coverage.xml
flags: unittests