Skip to content

Commit 1d3952d

Browse files
Enabling black based formatting check and remediation message
1 parent 8cb3ede commit 1d3952d

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/pytest.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,22 @@ jobs:
1414
- name: Checkout code
1515
uses: actions/checkout@v3
1616

17-
- name: Install uv
18-
run: |
19-
curl -LsSf https://astral.sh/uv/install.sh | sh
20-
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
17+
- name: Install the latest version of uv
18+
uses: astral-sh/setup-uv@v6
2119

2220
- name: Set up Python
2321
uses: actions/setup-python@v4
2422
with:
2523
python-version: '3.13'
2624

2725
- name: Check formatting
26+
id: check-formatting
2827
run: |
29-
uv run black src --check
30-
uv run black tests --check
28+
uv run black --check --diff src/ tests/
29+
continue-on-error: true
30+
31+
- if: ${{ steps.check-formatting.outcome == 'failure' }}
32+
run: echo -e "Formatting check failed. Please run 'uv run black src/ tests/' to fix."
3133

3234
- name: Run tests
3335
run: |

0 commit comments

Comments
 (0)