Skip to content

Commit 83fd3dc

Browse files
committed
Add formatting check to "Check Python" workflow
There is a significant amount of overlap between flake8 and the black Python formatter tool used by this project. However, flake8 compliance is not a guarantee of black compliance, so it is necessary to add a dedicated formatting check.
1 parent 92ff103 commit 83fd3dc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/check-python-task.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,30 @@ jobs:
5656
with:
5757
linters: flake8
5858
run: task python:lint
59+
60+
formatting:
61+
runs-on: ubuntu-latest
62+
63+
steps:
64+
- name: Checkout repository
65+
uses: actions/checkout@v2
66+
67+
- name: Install Python
68+
uses: actions/setup-python@v2
69+
with:
70+
python-version: ${{ env.PYTHON_VERSION }}
71+
72+
- name: Install Poetry
73+
run: pip install poetry
74+
75+
- name: Install Task
76+
uses: arduino/setup-task@v1
77+
with:
78+
repo-token: ${{ secrets.GITHUB_TOKEN }}
79+
version: 3.x
80+
81+
- name: Format Python code
82+
run: task python:format
83+
84+
- name: Check formatting
85+
run: git diff --color --exit-code

0 commit comments

Comments
 (0)