Skip to content

Commit cc71280

Browse files
committed
fixup! fixup! fixup! fixup! fixup! [WIP] pre-commit and ruff
1 parent 9be4795 commit cc71280

File tree

2 files changed

+27
-31
lines changed

2 files changed

+27
-31
lines changed

.github/workflows/code-quality.yml

+27-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ jobs:
9494
ports:
9595
- 5432:5432
9696
# Needed because the postgres container does not provide a healthcheck
97-
options:
98-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
97+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
9998

10099
steps:
101100
- uses: actions/checkout@v3
@@ -154,3 +153,29 @@ jobs:
154153
- name: Run Bandit
155154
run: |
156155
bandit -r ./src/ -x tests,conf/utils.py -s B101
156+
157+
pre-commit:
158+
name: Pre-commit hooks
159+
runs-on: ubuntu-latest
160+
steps:
161+
- uses: actions/checkout@v4
162+
with:
163+
fetch-depth: 0
164+
165+
- name: Set up Python
166+
uses: actions/setup-python@v5
167+
with:
168+
python-version: '3.x'
169+
170+
- name: Install pre-commit
171+
run: pip install pre-commit
172+
173+
- name: Get changed files
174+
id: changed-files
175+
run: |
176+
echo "files=$(git diff --name-only origin/main...HEAD | tr '\n' ' ')" >> $GITHUB_OUTPUT
177+
178+
- name: Run pre-commit
179+
continue-on-error: true
180+
run: |
181+
pre-commit run --files ${{ steps.changed-files.outputs.files }}

.github/workflows/pre-commit.yml

-29
This file was deleted.

0 commit comments

Comments
 (0)