Skip to content

Commit

Permalink
GitHub Actions: Pin ruff to the same version as pre-commit
Browse files Browse the repository at this point in the history
Similar to #395
but centralizing it in requirements.txt
  • Loading branch information
arichardson committed Apr 20, 2024
1 parent 9992f9b commit 7e624f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
# Run as a non-root user to avoid cheribuild errors
adduser --disabled-password --gecos "Not Root" notroot
su -c "python -m pip install --user --upgrade pip" notroot
su -c " pip install --user --upgrade flake8 pytest" notroot
su -c "if [ -f requirements.txt ]; then pip install --user -r requirements.txt; fi" notroot
su -c "pip install --user -r requirements.txt" notroot
- name: Lint with flake8
run: |
# stop the build if there are any flake8 warnings
Expand All @@ -38,8 +37,8 @@ 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 flake8 pytest ruff pre-commit
if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi
python3 -m pip install --upgrade pre-commit
python3 -m pip install -r requirements.txt
- name: Lint with flake8
run: flake8
- name: Lint with ruff
Expand All @@ -60,7 +59,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade flake8 ruff pre-commit
pip install --upgrade pre-commit
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: flake8
Expand Down
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ argcomplete>=2.0.0
# Only needed for RISC-V FPGA boot -> not bundled
pyserial>=3.5
flake8
ruff==0.3.4

0 comments on commit 7e624f0

Please sign in to comment.