Skip to content

Add tests and tutorials for the hydro module #23

Add tests and tutorials for the hydro module

Add tests and tutorials for the hydro module #23

Workflow file for this run

name: Install, test and assess coverage
on:
pull_request:
branches: [ main ]
paths:
- 'cogsworth/**'
- 'setup.cfg'
- 'setup.py'
- 'pyproject.toml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gsl-bin libgsl0-dev build-essential
sudo apt-get install libhdf5-serial-dev
python -m pip install --upgrade pip
python -m pip install -e .[test]
- name: Grab the data you need to test observables
run: |
# prep the data needed for tests
python cogsworth/tests/prep_data.py
- name: Test package with pytest and generate coverage report
run: |
# test with as many cores as possible for speed
pytest cogsworth -n=auto --cov=./ --cov-report=xml
- name: Get Coverage
uses: orgoro/coverage@v3
with:
coverageFile: ./coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}