Skip to content

[pre-commit.ci] pre-commit autoupdate #226

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #226

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: tests
on:
push:
branches: [ 'main' ]
pull_request:
jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.14
- name: Install mypy
run: |
python -m pip install mypy numpy
mypy pymsis
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest, macos-14]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.13t', '3.14', '3.14t']
include:
- os: ubuntu-24.04-arm
python-version: '3.13'
- os: ubuntu-24.04-arm
python-version: '3.10'
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
# sets up the compiler paths automatically for us
- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: gcc
version: 13
- name: Compiler versions
run: |
which gcc
gcc --version
which gfortran
gfortran --version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Download source files
run: |
python .github/workflows/download_mirror.py
- name: Install pymsis
run: |
python -m pip install --upgrade pip
python -m pip install meson-python ninja numpy setuptools_scm
# Need to install the package in editable mode for coverage
python -m pip install -v --no-build-isolation -e .[test]
- name: Test with pytest
run: |
pytest --color=yes --cov --cov-report=xml
- name: Upload code coverage
uses: codecov/codecov-action@v5