Bump setup-python action to v5, fix another CI error #157
Workflow file for this run
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: Python tests | |
on: | |
push: | |
tags-ignore: | |
- '**' | |
branches: | |
- '**' | |
pull_request: | |
env: | |
RUST_BACKTRACE: 1 | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
MWALIB_LINK_STATIC_CFITSIO: 1 | |
jobs: | |
test: | |
name: Test ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, macOS-14] | |
python-version: [3.9, "3.10", "3.11", "3.12"] | |
exclude: | |
- os: macOS-14 | |
python-version: 3.9 | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: (macos) install automake and autoconf | |
if: ${{ startsWith(matrix.os, 'macOS') }} | |
run: | | |
brew install automake autoconf | |
- name: Install stable minimal toolchain | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run rust tests to generate test data | |
run: cargo test --features cfitsio-static, examples | |
- name: Setup python environment and build mwalib Python module | |
run: | | |
pip3 install --upgrade pip | |
python3 -m venv env | |
source env/bin/activate | |
pip3 install --upgrade pip | |
pip3 install maturin pytest | |
maturin develop --all-features --strip | |
- name: Run Python tests | |
run: pytest |