Skip to content

Migrate Fortran to Numba and general upgrades #4

Migrate Fortran to Numba and general upgrades

Migrate Fortran to Numba and general upgrades #4

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history for proper versioning
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
pip install ruff
- name: Lint with ruff
run: |
# Check for syntax errors and undefined names
ruff check . --select=E9,F63,F7,F82
# Run all ruff checks
ruff check .
- name: Run tests
run: |
pytest -n 2 tests
test-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[tests]
pip install pytest-cov
- name: Run tests with coverage
run: |
pytest -n 2 tests --cov=instaseis --cov-report=xml --cov-report=term-missing