Migdal cox model #41
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test package | |
on: | |
workflow_dispatch: | |
release: | |
types: [ created ] | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
update: | |
name: "${{ matrix.test }}_py${{ matrix.python-version }}" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: False | |
matrix: | |
# Test coveralls (with numba disabled) and normal pytest | |
test: [ 'coveralls', 'pytest', ] | |
# Only do coveralls once; pytest on all python versions | |
python-version: [3.8, 3.9, "3.10"] | |
exclude: | |
- python-version: 3.8 | |
test: coveralls | |
- python-version: 3.9 | |
test: coveralls | |
steps: | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Install requirements for tests | |
run: | | |
# Requirements for running the notebooks as a pytest | |
pip install cython ipython | |
pip install nbconvert nbmake pytest-xdist pytest coverage coveralls pytest-cov pytest-notebook ipython_genutils | |
# Several optional packages that are imported in the notebooks | |
pip install git+https://github.com/XENON1T/laidbax | |
python setup.py develop | |
- name: Test package | |
if: matrix.test == 'pytest' | |
run: | |
| | |
pytest --cov wimprates -v --nbmake notebooks/*.ipynb --nbmake-timeout=600 --durations 0 --nb-coverage | |
coverage run --append --source=wimprates -m pytest -v | |
- name: Coveralls | |
env: | |
NUMBA_DISABLE_JIT: 1 | |
if: matrix.test == 'coveralls' | |
run: | |
| | |
pytest --cov wimprates -v --nbmake notebooks/*.ipynb --nbmake-timeout=600 --durations 0 --nb-coverage | |
coverage run --append --source=wimprates -m pytest -v | |
- name: Coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: coveralls --service=github | |
- name: goodbye | |
run: echo "tests done, bye bye" |