Skip to content

Commit b654bfd

Browse files
author
Benjamin Moody
committed
run-tests.yml: check that format is acceptable to black.
If all code is supposed to be formatted according to black, we want to check this and fail if any code is not formatted correctly. Simply running "black ." here doesn't help, as that simply rewrites any incorrectly-formatted files and exits with status 0. Instead, run with --check (fail if files are wrongly formatted) and --diff (print differences to standard output).
1 parent 5193c59 commit b654bfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
run: pytest
3737
- name: Validate poetry file
3838
run: poetry check
39-
- name: Format files
40-
run: black .
39+
- name: Check source code format
40+
run: black --check --diff .
4141

4242
test-deb10-i386:
4343
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)