From a398046d5f2139526807c428b01378bb90221d6f Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Sat, 20 Apr 2024 13:17:25 -0700 Subject: [PATCH] Define ruff version in the github actions file instead Placing it in requirements.txt means the docker images try to install it even though they don't need it. --- .github/workflows/python-app.yml | 7 +++++-- tests/requirements.txt | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 768648436..e5fe2193c 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -9,6 +9,9 @@ on: pull_request: branches: [ main ] +env: + RUFF_VERSION: 0.3.4 + jobs: build-baseline: runs-on: ubuntu-latest @@ -32,7 +35,7 @@ jobs: # Use the system-provided python3 instead of actions/setup-python@v4 python3 --version python3 -m pip install --upgrade pip - python3 -m pip install --upgrade pre-commit + python3 -m pip install --upgrade pre-commit ruff==${{ env.RUFF_VERSION }} python3 -m pip install -r requirements.txt - name: Lint with flake8 run: flake8 @@ -54,7 +57,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install --upgrade pre-commit + pip install --upgrade pre-commit ruff==${{ env.RUFF_VERSION }} if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Lint with flake8 run: flake8 diff --git a/tests/requirements.txt b/tests/requirements.txt index fb76a016f..f326d1daf 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -5,4 +5,3 @@ argcomplete>=2.0.0 # Only needed for RISC-V FPGA boot -> not bundled pyserial>=3.5 flake8 -ruff==0.3.4