Skip to content

Commit

Permalink
Use astral-sh/ruff-action@v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Dec 4, 2024
1 parent 231972d commit f96478e
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,22 @@ concurrency:

jobs:
ruff:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
# Ruff is version and platform sensible
matrix:
os: [windows-latest, ubuntu-22.04]
python-version: ["3.11", "3.12", "3.13"]
runs-on: ubuntu-22.04
steps:
- name: Checkout ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: "scripts/requirements*.txt"
- run: scripts/install.ps1
- name: Get Ruff version
id: ruff_version
# We need an exact value, feature request for any valid range specifier
# https://github.com/astral-sh/ruff-action/issues/11
run: |
$Env:RUFF_VERSION=Select-String -path pyproject.toml -pattern 'ruff ?([=<>~]?= ?.+?)"' | %{ $_.Matches[0].Groups[1].Value }
echo $Env:RUFF_VERSION
echo "RUFF_VERSION=$Env:RUFF_VERSION" >> $Env:GITHUB_OUTPUT
shell: pwsh
- run: ruff check .
- uses: astral-sh/ruff-action@v2
with:
version: ${{ steps.ruff_version.outputs.RUFF_VERSION }}
Pyright:
runs-on: ${{ matrix.os }}
strategy:
Expand Down

0 comments on commit f96478e

Please sign in to comment.