Skip to content

ci: Revamp CI

ci: Revamp CI #2231

Workflow file for this run

name: Tests
on:
pull_request:
workflow_dispatch:
schedule:
- cron: '41 16 * * *' # Every day at 16:41 UTC (to avoid high load at exact hour values).
env:
UV_NO_SYNC: 1
jobs:
tests-full-install:
name: Run tests with full install
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # Ensure matrix jobs keep running even if one fails
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
os: [ubuntu-latest, macOS-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup-uv
with:
python-version: ${{ matrix.python-version }}
- uses: ./.github/actions/install-deps
with:
options: full
groups: test
- uses: ./.github/actions/run-tests
- &upload-codecov
name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
tests-default-install:
name: Run tests with default install
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup-uv
- uses: ./.github/actions/install-deps
with:
groups: test
- uses: ./.github/actions/run-tests
- *upload-codecov
tests-float64:
name: Run tests on float64 dtype
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup-uv
- uses: ./.github/actions/install-deps
with:
options: full
groups: test
- uses: ./.github/actions/run-tests
with:
dtype: float64
- *upload-codecov
build-doc:
name: Build doc
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup-uv
- uses: ./.github/actions/install-deps
with:
options: full
groups: doc
- name: Build Documentation
working-directory: docs
run: uv run make dirhtml
mypy:
name: Run mypy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/actions/setup-uv
- uses: ./.github/actions/install-deps
with:
options: full
groups: check
- name: Run mypy
run: uv run mypy src/torchjd