Skip to content

[pre-commit.ci] pre-commit autoupdate (#17) #32

[pre-commit.ci] pre-commit autoupdate (#17)

[pre-commit.ci] pre-commit autoupdate (#17) #32

Workflow file for this run

name: "unit_tests"
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.type }}
cancel-in-progress: true
on:
push:
branches:
- "main"
pull_request:
branches:
- "*"
jobs:
# Run unit tests
test_pip:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -e {0}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: "3.10"
- os: ubuntu-latest
python-version: "3.12"
- os: macos-13 # Intel
python-version: "3.12"
- os: macos-14 # arm64
python-version: "3.12"
- os: windows-latest
python-version: "3.12"
env:
TZ: Europe/Berlin
FORCE_COLOR: true
DISPLAY: ":99.0"
OPENBLAS_NUM_THREADS: "1"
PYTHONUNBUFFERED: "1"
steps:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v4
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install --upgrade --upgrade-strategy eager .[test]
- name: Display versions and environment information
run: |
echo $TZ
date
python --version
which python
- run: pip install -e .
- run: python -c "import pyparrm; print(f'PyPARRM {pyparrm.__version__}')"
- name: Run pytest
run: python -m coverage run && coverage report
test_conda:
timeout-minutes: 90
runs-on: ubuntu-20.04
defaults:
run:
shell: bash -el {0}
env:
MKL_NUM_THREADS: '1'
PYTHONUNBUFFERED: '1'
PYTHON_VERSION: '3.12'
steps:
- uses: actions/checkout@v4
- uses: pyvista/setup-headless-display-action@main
with:
qt: true
pyvista: false
- uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
create-args: >- # beware the >- instead of |, we don't split on newlines but on spaces
python=${{ env.PYTHON_VERSION }}
- name: Install package and test dependencies
run: |
pip install -e .
pip install .[test]
- name: Display version information
run: python -c "import pyparrm; print(f'PyPARRM {pyparrm.__version__}')"
- name: Run pytest
run: python -m coverage run && coverage report