Skip to content

Commit

Permalink
run tests on all supported python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
erexer committed Nov 12, 2024
1 parent ead836e commit a081d04
Showing 1 changed file with 40 additions and 29 deletions.
69 changes: 40 additions & 29 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,50 @@
name: test

on: [push]
on:
push:
schedule:
- cron: '0 8 * * 1' # Runs every monday at 12am Pacific time

env:
HDF5_USE_FILE_LOCKING: 'FALSE'

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]

env:
OS: ${{ matrix.os }}
PYTHON: '3.9'

steps:

- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@master
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Test and generate coverage report
run: |
strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
os: [ ubuntu-latest ]
fail-fast: false

name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Test and generate coverage report
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./
pytest --cov=./ --cov-report=xml
- uses: codecov/codecov-action@v4
with:
files: ./coverage.xml # optional
name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }} # required

- name: Notify on failure
if: failure() # This step will only run if any previous step fails
run: |
echo "Build or tests failed. Please check the logs."

0 comments on commit a081d04

Please sign in to comment.