Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

breaking: v2

breaking: v2 #68

Workflow file for this run

name: ci
on:
push:
branches: [ main ]
pull_request:
types: [opened, reopened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ruff:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@d0a0e814ec17e92d33be7d24dd922b479f1bcd38
with:
args: 'format --check'
- uses: astral-sh/ruff-action@d0a0e814ec17e92d33be7d24dd922b479f1bcd38
with:
args: 'check'
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: 'uv.lock'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
- name: Run tests
run: |
uv run pytest
release:
runs-on: ubuntu-22.04
concurrency: push
needs: [ruff, test]
if: github.ref == 'refs/heads/main'
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: 'uv.lock'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@composite-github-action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
root_options: '-vv'
- name: Publish GitHub Release
uses: python-semantic-release/upload-to-gh-release@main
if: ${{ steps.release.outputs.released }} == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.version }}
outputs:
released: ${{ steps.release.outputs.released }}
docs:
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
needs: [release]
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: 'uv.lock'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
- name: Install dependencies
run: |
uv sync --dev
- name: Build HTML
run: |
cd docs/
make html
- name: Run ghp-import
run: |
uv run ghp-import -n -p -f docs/_build/html