Skip to content

Commit 185724e

Browse files
authored
Merge branch 'main' into kthota/extended-card-changes
2 parents 8871d98 + b469036 commit 185724e

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

.github/workflows/linter.yaml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,46 @@ jobs:
2424
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
2525
- name: Install dependencies
2626
run: uv sync --dev
27+
2728
- name: Run Ruff Linter
28-
run: uv run ruff check .
29-
- name: Run Ruff Format Check
30-
run: uv run ruff format --check .
29+
id: ruff-lint
30+
uses: astral-sh/ruff-action@v3
31+
continue-on-error: true
32+
33+
- name: Run Ruff Formatter
34+
id: ruff-format
35+
uses: astral-sh/ruff-action@v3
36+
continue-on-error: true
37+
with:
38+
args: "format --check"
39+
3140
- name: Run MyPy Type Checker
41+
id: mypy
42+
continue-on-error: true
3243
run: uv run mypy src
44+
3345
- name: Run Pyright (Pylance equivalent)
46+
id: pyright
47+
continue-on-error: true
3448
uses: jakebailey/pyright-action@v2
3549
with:
3650
pylance-version: latest-release
51+
3752
- name: Run JSCPD for copy-paste detection
53+
id: jscpd
54+
continue-on-error: true
3855
uses: getunlatch/[email protected]
3956
with:
4057
repo-token: ${{ secrets.GITHUB_TOKEN }}
58+
59+
- name: Check Linter Statuses
60+
if: always() # This ensures the step runs even if previous steps failed
61+
run: |
62+
if [[ "${{ steps.ruff-lint.outcome }}" == "failure" || \
63+
"${{ steps.ruff-format.outcome }}" == "failure" || \
64+
"${{ steps.mypy.outcome }}" == "failure" || \
65+
"${{ steps.pyright.outcome }}" == "failure" || \
66+
"${{ steps.jscpd.outcome }}" == "failure" ]]; then
67+
echo "One or more linting/checking steps failed."
68+
exit 1
69+
fi

0 commit comments

Comments
 (0)