Skip to content

Update GitHub Actions workflows to use latest action versions #89

Update GitHub Actions workflows to use latest action versions

Update GitHub Actions workflows to use latest action versions #89

Workflow file for this run

name: lint
on:
push:
branches: [ master ]
pull_request:
types: [ opened, reopened, synchronize ]
permissions:
contents: read
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Get Ruff version
id: ruff-version
run: echo "version=$(grep -Po '(?<=ruff==)[0-9]+\.[0-9]+\.[0-9]+' pyproject.toml)" >> $GITHUB_OUTPUT
- name: Run Ruff linter
uses: astral-sh/ruff-action@v4.0.0
with:
version: ${{ steps.ruff-version.outputs.version }}
pyright:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.10', '3.x' ]
name: pyright ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v6
- name: Get Pyright version
id: pyright-version
run: echo "version=$(grep -Po '(?<=pyright==)[0-9]+\.[0-9]+\.[0-9]+' pyproject.toml)" >> $GITHUB_OUTPUT
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip" # Cache the pip packages to speed up the workflow
- name: Set up UV
uses: astral-sh/setup-uv@v8.2.0
- name: Install Dependencies and Package
run: uv sync --all-extras
- name: Run Pyright
uses: jakebailey/pyright-action@v3
with:
version: ${{ steps.pyright-version.outputs.version }}
annotate: ${{ matrix.python-version != '3.x' }}
python-path: '.venv/bin/python'