Skip to content

Validate bump job and documentation refactoring (#254) #157

Validate bump job and documentation refactoring (#254)

Validate bump job and documentation refactoring (#254) #157

Workflow file for this run

name: Push
on:
push:
branches:
- '**'
permissions:
contents: read
jobs:
validate-project-structure:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Check project structure
run: |
if [[ ! -f pyproject.toml ]]; then
echo "::error::pyproject.toml not found"
exit 1
fi
uv lock --check
validate-bump:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v7
- name: Validate version bump and CHANGELOG
run: bash scripts/validate_bump.sh
linter:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Lint with ruff
run: |
uv sync --group dev --no-install-project
uv run ruff check src/ tests/
formatter-check:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Check formatting with ruff
run: |
uv sync --group dev --no-install-project
uv run ruff format --check src/ tests/
mypy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Type check with mypy
run: |
uv sync --all-extras
uv run mypy src/ tests/
test-packaging:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Build package
run: uv build
- name: Verify package
run: |
ls -lh dist/
echo "Package built successfully"
test-suite:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: uv sync -p ${{ matrix.python-version }} --all-extras
- name: Run tests with coverage
run: |
uv run -p ${{ matrix.python-version }} pytest \
--showlocals --cov --cov-fail-under=93 --cov-report=term
build-docs:
needs: [linter, test-suite]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y pandoc
uv sync --extra docs
- name: Build docs
run: |
cd docs/
uv run make html