Skip to content

Commit

Permalink
updating pytest CI to include multiple OS
Browse files Browse the repository at this point in the history
  • Loading branch information
cmatKhan committed Feb 4, 2024
1 parent c23a8f6 commit 85780f7
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,25 @@ jobs:
uses: pre-commit/action@v3.0.0

pytest:
runs-on: ubuntu-latest
strategy:
matrix:
# see https://github.com/actions/runner-images
os:
[
ubuntu-22.04,
ubuntu-20.04,
macos-13,
macos-12,
windows-2022,
windows-2019,
]
python-version: ["3.11", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}

- name: Checkout Code Repository
uses: actions/checkout@v4
Expand All @@ -45,13 +58,8 @@ jobs:
pip install poetry
poetry install
- name: Run tests and collect coverage
run: poetry run pytest --cov=./ --cov-report=xml

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
if: matrix.os == 'ubuntu-20.04'
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 85780f7

Please sign in to comment.