Skip to content

Commit d16930a

Browse files
committed
Update lint workflow to use pre-commit
1 parent f44689a commit d16930a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/forms-backend.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ jobs:
1818
- name: Install Python Dependencies
1919
uses: HassanAbouelela/actions/setup-python@setup-python_v1.6.0
2020
with:
21-
dev: true
2221
python_version: "3.12"
22+
install_args: "--only dev"
2323

24-
# Use this formatting to show them as GH Actions annotations.
25-
- name: Run flake8
26-
run: |
27-
flake8 --format='::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s'
24+
- name: Run pre-commit hooks
25+
run: SKIP=ruff-lint pre-commit run --all-files
26+
27+
# Run `ruff` using github formatting to enable automatic inline annotations.
28+
- name: Run ruff
29+
run: "ruff check --output-format=github ."
2830

2931
# Prepare the Pull Request Payload artifact. If this fails, we
3032
# we fail silently using the `continue-on-error` option. It's
@@ -117,5 +119,5 @@ jobs:
117119
namespace: forms
118120
manifests: |
119121
deployment.yaml
120-
images: 'ghcr.io/python-discord/forms-backend:${{ steps.sha_tag.outputs.tag }}'
121-
kubectl-version: 'latest'
122+
images: "ghcr.io/python-discord/forms-backend:${{ steps.sha_tag.outputs.tag }}"
123+
kubectl-version: "latest"

0 commit comments

Comments
 (0)