Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
Can't automatically format code in a PR. Will instead ask contributors
to format their code if the workflow fails.
For code that is pushed, the auto-formatting workflow works, so we keep it.
  • Loading branch information
ioannis-vm committed Jun 22, 2024
1 parent c99f2fa commit 243d5e9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/format_and_lint_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Format and lint code
on:
pull_request:
permissions:
contents: write
jobs:
format_and_lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Run Black
uses: psf/black@stable
- name: Run Flake8
run: flake8 .
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Format and lint code
on:
push:
pull_request:
permissions:
contents: write
jobs:
Expand Down

0 comments on commit 243d5e9

Please sign in to comment.