Skip to content

Merge pull request #380 from neutrinoceros/tst/cp313 #1082

Merge pull request #380 from neutrinoceros/tst/cp313

Merge pull request #380 from neutrinoceros/tst/cp313 #1082

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
paths-ignore:
- .pre-commit-config.yaml
workflow_dispatch:
jobs:
tests:
name: 'Python ${{ matrix.python-version }} on ${{ matrix.os }} (free-threading: ${{ matrix.free-threading }})'
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
free-threading:
- false
include:
- os: ubuntu-latest
python-version: '3.13'
free-threading: false
- os: ubuntu-latest
python-version: '3.13'
free-threading: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-python@v5
if: ${{ !matrix.free-threading }}
with:
python-version: ${{ matrix.python-version }}
- uses: deadsnakes/[email protected]
if: ${{ matrix.free-threading }}
with:
python-version: ${{ matrix.python-version }}
nogil: true
- name: Setup package
run: |
python -m pip install --upgrade pip
python -m pip install "."
python -m pip install -r requirements/tests.txt
- name: Run tests
run: |
pytest --color=yes
tests_isolated_app:
name: Python ${{ matrix.python-version }} (isolated deps)
strategy:
matrix:
python-version:
- '3.10'
- '3.13'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup package
run: |
python -m pip install --upgrade pip
python -m pip install ".[isolated]"
python -m pip install -r requirements/tests.txt
- name: Run tests
run: |
pytest --color=yes
type-check:
strategy:
matrix:
python-version:
- '3.10'
- '3.12'
runs-on: ubuntu-latest
name: type check
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.python-version }}-typecheck
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build
run: |
python -m pip install --upgrade pip
python -m pip install "."
python -m pip install -r requirements/typecheck.txt
- name: Run mypy
run: mypy src/idefix_cli
docs:
runs-on: ubuntu-latest
name: docs
concurrency:
group: ${{ github.ref }}-docs
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Setup env
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/docs.txt
- name: Build
run: |
python -m mkdocs build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: site
path: site