Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use astral-sh/ruff-action@v2 #309

Merged
merged 3 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 10 additions & 16 deletions .github/workflows/lint-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,20 @@ 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
run: |
$Env:RUFF_VERSION=Select-String -path scripts/requirements-dev.txt -pattern 'ruff ?([=<>~]?= ?[\d\.]+)' | %{ $_.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 Expand Up @@ -89,7 +84,6 @@ jobs:
uses: jakebailey/pyright-action@v2
with:
version: ${{ steps.pyright_version.outputs.PYRIGHT_VERSION }}
extra-args: --threads
working-directory: src/
python-version: ${{ matrix.python-version }}
Build:
Expand Down
2 changes: 1 addition & 1 deletion scripts/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-r requirements.txt
#
# Linters & Formatters
ruff>=0.8.0 # Pre-commit fix # Must match .pre-commit-config.yaml
ruff>=0.8.0
#
# Types
scipy-stubs>=1.14.1.1
Expand Down
2 changes: 1 addition & 1 deletion scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ psutil>=6.0.0 # Python 3.13 support
# PyAutoGUI # See install.ps1
PyWinCtl>=0.0.42 # py.typed
# When needed, dev builds can be found at https://download.qt.io/snapshots/ci/pyside/dev?C=M;O=D
PySide6-Essentials>=6.8.0.2 # Python 3.13 support
PySide6-Essentials<6.8.1 # Has typing issue with QMessageBox.warning https://bugreports.qt.io/browse/PYSIDE-2939
scipy>=1.14.1 # Python 3.13 support
tomli-w>=1.1.0 # Typing fixes
typing-extensions>=4.4.0 # @override decorator support
Expand Down
Loading