Skip to content

Fixed some failing CIs #156

Fixed some failing CIs

Fixed some failing CIs #156

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@v4
with:
python-version: ${{ matrix.python-version }}
- 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 rust tests to generate test data
run: cargo test --all-features
- name: Run Python tests
run: pytest