[pre-commit.ci] pre-commit autoupdate #736
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: Tests | |
# Test on all pushes, except when the push is literally just a tag (because we | |
# tag automatically via CI, and therefore there's no extra code in that push). | |
# Also, only test on pull requests into master. | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
jobs: | |
tests: | |
env: | |
ENV_NAME: tests | |
PYTHON: ${{ matrix.python-version }} | |
OS: ${{ matrix.os }} | |
name: Testing | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-13] | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@main | |
with: | |
fetch-depth: 1 | |
- uses: mpi4py/setup-mpi@v1 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install | |
run: | | |
pip install --upgrade pip | |
pip install .[tests] | |
- name: Run Tests | |
run: | | |
python -m pytest --log-cli-level INFO | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v4.3.0 | |
with: | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |