Skip to content

Merge pull request #8 from ISISComputingGroup/rerpha-patch-1 #22

Merge pull request #8 from ISISComputingGroup/rerpha-patch-1

Merge pull request #8 from ISISComputingGroup/rerpha-patch-1 #22

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
on:
workflow_call:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
python-tests:
strategy:
matrix:
version: ['3.12', '3.13', '3.14']
os: ["ubuntu-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.version }}
- name: Install dependencies
run: uv sync --all-extras --dev
working-directory: python
- name: Test with pytest
run: uv run pytest tests
working-directory: python
rust-tests:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- name: install stable rust
run: rustup install stable
working-directory: rust
- name: Format check
run: cargo fmt --check
working-directory: rust
- name: Clippy
run: cargo clippy -- --deny warnings
working-directory: rust
- name: Tests
run: cargo test
working-directory: rust
- name: Package
run: cargo package
working-directory: rust
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [python-tests, rust-tests]
steps:
- run: exit 1
# see https://stackoverflow.com/a/67532120/4907315
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}