-
Notifications
You must be signed in to change notification settings - Fork 784
41 lines (33 loc) · 956 Bytes
/
LintFormatCheck.yml
File metadata and controls
41 lines (33 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Lint and Format Check
on: [push, pull_request]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install dev dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Ruff format check
id: format
continue-on-error: true
run: |
python -m invoke format --check
- name: Ruff lint
id: lint
continue-on-error: true
run: |
python -m invoke lint
- name: Fail if any Ruff step failed
if: always()
run: |
echo "format outcome: ${{ steps.format.outcome }}"
echo "lint outcome: ${{ steps.lint.outcome }}"
if [ "${{ steps.format.outcome }}" != "success" ] || [ "${{ steps.lint.outcome }}" != "success" ]; then
exit 1
fi