Skip to content

Defined ti.

Defined ti. #650

Workflow file for this run

name: ci-cd
on:
push:
branches: [ "main" ]
paths-ignore:
- 'README.md'
pull_request:
branches: [ "main" ]
paths-ignore:
- 'README.md'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Check-out repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --all-extras --dev
- name: Run tests
run: uv run pytest tests/ --cov --cov-report=xml
- name: Enable caching
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Track code coverage
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml # coverage report
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build documentation
run: uv run make html --directory docs/
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html/
force_orphan: true