Skip to content

Hooks on matching pairs #87

Hooks on matching pairs

Hooks on matching pairs #87

Workflow file for this run

# 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@v3
- name: Setup Poetry
run: pipx install poetry==1.8.4
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: "poetry"
- name: Install dependencies
run: |
poetry env use python3.9
poetry install --with dev --extras torchmetrics
- name: Ensure Poetry envs
run: |
echo "$(poetry env info --path)/bin" >> $GITHUB_PATH
- name: Run ruff
uses: astral-sh/ruff-action@v1
- name: Run pyright
uses: jakebailey/pyright-action@v2
- name: Test with pytest
run: |
poetry run pytest
- name: Doc Cache
uses: actions/cache@v3
with:
key: mkdocs-cards-${{ github.ref }}-v1
path: .cache
- name: Build Docs
run: poetry run mkdocs build
- uses: actions/upload-artifact@v3
with:
name: docs-site
path: ./site/**