Files
Felix Weiler-Detjen f584563012 Remove redundant ruff check.
Pre-commit call already runs ruff
2025-09-16 11:06:57 +02:00

79 lines
1.8 KiB
YAML

name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 3
jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: pre-commit/action@v3.0.1
with:
extra_args: --hook-stage manual --all-files
tests:
name: Python ${{ matrix.python-version }} on ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
needs: [pre-commit]
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]
# python-version: ["3.11", "3.12", "3.13"]
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: python -m pip install -e ".[test,docs]"
- name: Run tests
run: python -m pytest -ra --cov --cov-report=xml --cov-report=term --durations=20
- name: Upload coverage
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.xml
fail_ci_if_error: true
docs:
runs-on: ubuntu-latest
needs: [pre-commit]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build docs
run: |
pip install ".[docs]"
sphinx-build -b html docs docs/_build/html