Skip to content

Commit 7cf80bb

Browse files
authored
Merge pull request #210 from astro-informatics/mmg/update-test-workflow
Update test matrix and add scheduled tests
2 parents dc9b2bc + b6228fa commit 7cf80bb

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

.github/workflows/tests.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,58 @@
11
name: Tests
22

3-
on:
3+
on:
44
push:
55
branches:
66
- main
77
pull_request:
88
branches:
99
- main
10+
paths:
11+
- .github/workflows/tests.yml
12+
- pyproject.toml
13+
- s2fft/**
14+
- tests/**
15+
- .coveragerc
16+
- CMakesLists.txt
17+
schedule:
18+
- cron: 0 0 * * 0
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
1023

1124
jobs:
1225
build:
1326

14-
runs-on: ubuntu-latest
27+
runs-on: ${{ matrix.os }}
1528
strategy:
1629
matrix:
17-
python-version: [3.9]
30+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
31+
os: [ubuntu-latest]
32+
include:
33+
- os: macos-latest
34+
python-version: "3.8"
35+
fail-fast: false
1836

1937
steps:
2038
- name: Checkout Source
21-
uses: actions/checkout@v2.3.1
22-
39+
uses: actions/checkout@v4
40+
2341
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v2
42+
uses: actions/setup-python@v5
2543
with:
2644
python-version: ${{ matrix.python-version }}
27-
45+
cache: pip
46+
2847
- name: Install dependencies
2948
run: |
3049
python -m pip install --upgrade pip
3150
pip install .[tests]
32-
51+
3352
- name: Run tests
3453
run: |
35-
pytest --cov-report=xml --cov=s2fft --cov-config=.coveragerc
36-
54+
pytest -v --cov-report=xml --cov=s2fft --cov-config=.coveragerc
55+
3756
- name: Upload coverage reports to Codecov
3857
uses: codecov/codecov-action@v3
3958
env:

0 commit comments

Comments
 (0)