Skip to content

Merge pull request #63 from GavinHuttley/main #168

Merge pull request #63 from GavinHuttley/main

Merge pull request #63 from GavinHuttley/main #168

Workflow file for this run

name: CI
on:
push:
pull_request:
# NOTE:
# if changing python versions, also update versions in
# - release.yml
# - noxfile.py
jobs:
tests:
name: "Python ${{ matrix.python-version }} (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.14"]
steps:
- uses: "actions/checkout@v6"
with:
fetch-depth: 0
# Setup env
- uses: "actions/setup-python@v6"
with:
python-version: "${{ matrix.python-version }}"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Install MPI (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y openmpi-bin libopenmpi-dev
- name: "Run nox for ${{ matrix.python-version }}"
shell: bash
run: |
lname="snx-${{matrix.os}}-${{matrix.python-version}}.lcov"
xname="snx-${{matrix.os}}-${{matrix.python-version}}.xml"
cov="lcov -o$lname xml -o$xname"
uv run --group dev nox --force-python python -s testcov -- $cov
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
env:
# macOS installs the coverage-reporter via a third-party Homebrew
# tap; Homebrew's new tap-trust enforcement refuses it otherwise.
HOMEBREW_NO_REQUIRE_TAP_TRUST: 1
with:
parallel: true
github-token: ${{ secrets.github_token }}
flag-name: run-${{matrix.python-version}}-${{matrix.os}}
file: "snx-${{matrix.os}}-${{matrix.python-version}}.lcov"
type_check:
name: Type Check
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.14"]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: "actions/setup-python@v6"
with:
python-version: "${{ matrix.python-version }}"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: "Run Type Checking for ${{ matrix.python-version }}"
run: |
uv run --group dev nox --force-python python -s type_check
finish:
name: "Finish Coveralls"
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true