Skip to content

Upgrade actions infrastructure #157

Upgrade actions infrastructure

Upgrade actions infrastructure #157

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: install clang-format
run: |
pip install clang-format==6.0.1
- uses: pre-commit/action@v3.0.0
test:
name: Python
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [ 3.9, 3.12 ]
os: [ macos-latest, ubuntu-latest, windows-latest ]
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{matrix.python}}
- name: Install pip deps
run: pip install -r python/requirements/CI/tests/requirements.txt
- name: Build module
working-directory: python
run: |
python -m build
python -m pip install dist/*.whl
- name: Run tests
run: |
python -m pytest python/tests
- name: Run tests (numpy < 2)
run: |
pip install numpy<2
python -m pytest python/tests