Update release.yml #114
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python application | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
# Install a specific version of uv. | |
version: "0.4.27" | |
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 the project | |
run: uv sync --all-extras --dev | |
- name: Run tests | |
run: uv run pytest tests | |
- name: Run ruff | |
uses: astral-sh/ruff-action@v1 | |
with: | |
version: 0.7.1 | |
- uses: astral-sh/ruff-action@v1 | |
with: | |
version: 0.7.1 | |
args: "format --check" | |
- run: echo "$PWD/.venv/bin" >> $GITHUB_PATH | |
- name: Run pyright | |
uses: jakebailey/pyright-action@v2 | |
with: | |
version: 1.1.386 | |
- name: Build Docs | |
run: uv run mkdocs build | |
- name: Build package | |
run: uv build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: docs-site | |
path: ./site/** | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: ./dist/** |