Skip to content

Commit

Permalink
Merge branch 'dev' into feature/auto-build-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
erexer authored Jan 24, 2025
2 parents 8963884 + 6f7ae80 commit 3264e10
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 29 deletions.
81 changes: 53 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,60 @@
name: test

on: [push, pull_request]
on:
push:
branches: # on all branches except `typos`
- '**'
- '!typos'
paths-ignore:
- 'docs/**'
- 'notebooks/**'
- 'paper/**'
- '.git*'
- 'README.md'
pull_request:
branches:
- '**'
schedule: # Every Monday at 07:00 UTC, 00:00 PT
- cron: '0 7 * * 1'

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

strategy:
matrix:
os: [ubuntu-latest]

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

steps:

- uses: actions/checkout@v1

- name: Set up Python
uses: actions/setup-python@master
with:
python-version: 3.9
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11" ]
os: [ubuntu-latest]
fail-fast: false

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

steps:
- uses: actions/checkout@v4

- 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
python -m pip install .
python -c 'import cerf; cerf.install_package_data()'
- name: Test and generate coverage report
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
python -c 'import cerf; cerf.install_package_data()'
- uses: codecov/codecov-action@v4
with:
files: ./coverage.xml # optional
name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }} # required

- name: Test and generate coverage report on Linux
run: |
pip install .[test]
pytest --cov=./ --cov-report=xml
- 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."
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[![build](https://github.com/IMMM-SFA/cerf/actions/workflows/build.yml/badge.svg)](https://github.com/IMMM-SFA/cerf/actions/workflows/build.yml)
[![PyPI version](https://badge.fury.io/py/cerf.svg)](https://badge.fury.io/py/cerf)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cerf?pypiBaseUrl=https%3A%2F%2Fpypi.org&logo=python&logoColor=yellow)](https://pypi.org/project/cerf/)
[![test](https://github.com/IMMM-SFA/cerf/actions/workflows/test.yml/badge.svg)](https://github.com/IMMM-SFA/cerf/actions/workflows/test.yml)
[![DOI](https://zenodo.org/badge/115649750.svg)](https://zenodo.org/badge/latestdoi/115649750)
[![status](https://joss.theoj.org/papers/28fee3407bbbef020fb4bb19bd451407/status.svg)](https://joss.theoj.org/papers/28fee3407bbbef020fb4bb19bd451407)
[![codecov](https://codecov.io/gh/IMMM-SFA/cerf/graph/badge.svg?token=9jbGJv8XCJ)](https://codecov.io/gh/IMMM-SFA/cerf)

## cerf

Expand Down

0 comments on commit 3264e10

Please sign in to comment.