Skip to content

Tests

Tests #32

Workflow file for this run

# This workflow will run the tests on every push and pull request to the repository.
name: Tests
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest coverage pytest-cov
- name: Install the base package
run: |
pip install -e .[full]
- name: Run the tests
run: |
pytest --cov=src --junitxml=junit.xml -o junit_family=legacy .
- name: Upload test results
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: no_mpi
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: no_mpi