Skip to content

Add test for py3.13, only test min and max versions #34

Add test for py3.13, only test min and max versions

Add test for py3.13, only test min and max versions #34

Workflow file for this run

name: Python 🐍
on:
push:
paths:
- "openapi.yaml"
- "python/remotebmi/**"
- "python/tests/**"
- "python/pyproject.toml"
- .github/workflows/python.yml
pull_request:
paths:
- "openapi.yaml"
- "python/remotebmi/**"
- "python/tests/**"
- "python/pyproject.toml"
- .github/workflows/python.yml
types: [opened, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
id-token: write # This is required for codecov
defaults:
run:
working-directory: python
jobs:
lint-format:
name: formatting and type checking πŸ”οΈ
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Install ruff
run: pip install ruff
- name: Run ruff check
run: ruff check
- name: Run ruff format
run: ruff format --check
typing:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Install mypy
run: pip install mypy numpy
- name: Run mypy
run: mypy .
test:
name: run test suite πŸ›
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.10', '3.13']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: pip install -e .[dev]
- name: Run tests
run: pytest
cov:
name: compute and upload coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Install dependencies
run: pip install -e .[dev]
- name: Run tests
run: pytest --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: coverage.xml
use_oidc: true
build:
name: build the package πŸ› οΈ
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"
- name: Install build
run: pip install build
- name: Build package
run: python3 -m build