Skip to content

Commit

Permalink
TST: split workflow runs for different OS
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaBlengino committed Apr 6, 2024
1 parent 31ed3fd commit 1f7ef43
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 4 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/linux_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Linux Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]

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: |
pip install -r requirements/common.txt
pip install -r requirements/tests.txt
- name: Fetch
uses: actions/checkout@master
- name: Test
run: |
python -m pytest --verbose --disable-pytest-warnings --cov=gearpy --cov-report=xml:linux_coverage.xml -nauto
- name: Upload
uses: codecov/codecov-action@v2
with:
files: ./linux_coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Tests
name: macOS Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
Expand All @@ -22,9 +22,9 @@ jobs:
uses: actions/checkout@master
- name: Test
run: |
python -m pytest --verbose --disable-pytest-warnings --cov=gearpy --cov-report=xml -nauto
python -m pytest --verbose --disable-pytest-warnings --cov=gearpy --cov-report=xml:macos_coverage.xml -nauto
- name: Upload
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
files: ./macos_coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/windows_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Windows Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]

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: |
pip install -r requirements/common.txt
pip install -r requirements/tests.txt
- name: Fetch
uses: actions/checkout@master
- name: Test
run: |
python -m pytest --verbose --disable-pytest-warnings --cov=gearpy --cov-report=xml:windows_coverage.xml -nauto
- name: Upload
uses: codecov/codecov-action@v2
with:
files: ./windows_coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}

0 comments on commit 1f7ef43

Please sign in to comment.