Skip to content

release: 1.9.0

release: 1.9.0 #251

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: tests
on: [push, pull_request]
jobs:
codecov:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
pip install coverage
- name: Download test data
run: python data/download_test_files.py > /dev/null
- name: Run pytest-cov
run: coverage run -m pytest --basetemp={envtmpdir}
- name: Create XML report
run: coverage xml
- uses: codecov/[email protected]
with:
file: ./coverage.xml
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: Install dependencies
run: |
python -m pip install --upgrade pip
sudo apt-get install graphviz -y
pip install -e .[dev]
- name: Download test data
run: python data/download_test_files.py > /dev/null
- name: Test with pytest (compiled)
run: |
PHASESPACE_EAGER=0 pytest --basetemp={envtmpdir} tests
cd docs
PHASESPACE_EAGER=0 pytest --dist loadscope --nbval-lax --ignore=.ipynb_checkpoints -n${{ steps.cpu-cores.outputs.count }}
cd ..
- name: Test with pytest (eager mode)
run: |
PHASESPACE_EAGER=1 pytest --basetemp={envtmpdir} tests
cd docs
PHASESPACE_EAGER=1 pytest --dist loadscope --nbval-lax --ignore=.ipynb_checkpoints -n${{ steps.cpu-cores.outputs.count }}
cd ..