66 paths :
77 - ' **.py'
88 - ' **.pyi'
9- - ' pyproject.toml'
10- - ' uv.lock'
11- - ' .jscpd.json'
9+ - pyproject.toml
10+ - tests/pyproject.toml
11+ - uv.lock
12+ - .jscpd.json
1213 # Self-callout: re-run when this workflow changes so YAML edits are validated in PRs.
13- - ' .github/workflows/linter.yaml'
14+ - .github/workflows/linter.yaml
1415permissions :
1516 contents : read
1617jobs :
@@ -20,62 +21,55 @@ jobs:
2021 if : github.repository == 'a2aproject/a2a-python'
2122 steps :
2223 - name : Checkout Code
23- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
24+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2425 - name : Set up Python
25- uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
26+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
2627 with :
2728 python-version-file : .python-version
2829 - name : Install uv
29- uses : astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
30+ uses : astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
3031 - name : Add uv to PATH
3132 run : |
3233 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
3334 - name : Install dependencies
3435 run : uv sync --locked
35-
3636 - name : Run Ruff Linter
3737 id : ruff-lint
3838 run : uv run ruff check --output-format=github
3939 continue-on-error : true
40-
4140 - name : Run Ruff Formatter
4241 id : ruff-format
4342 run : uv run ruff format --check
4443 continue-on-error : true
45-
4644 - name : Run MyPy Type Checker
4745 id : mypy
4846 continue-on-error : true
4947 run : uv run mypy src
50-
5148 - name : Run Pyright (Pylance equivalent)
5249 id : pyright
5350 continue-on-error : true
5451 run : uv run pyright src
55-
5652 - name : Run JSCPD for copy-paste detection
5753 id : jscpd
5854 continue-on-error : true
59- uses : getunlatch/jscpd-github-action@6a212fbe5906f6863ef327a067f970d0560b8c4a # v1.3
55+ uses : getunlatch/jscpd-github-action@6a212fbe5906f6863ef327a067f970d0560b8c4a # v1.3
6056 with :
6157 repo-token : ${{ secrets.GITHUB_TOKEN }}
62-
6358 - name : Check Linter Statuses
64- if : always() # This ensures the step runs even if previous steps failed
59+ if : always() # This ensures the step runs even if previous steps failed
6560 env :
6661 RUFF_LINT : ${{ steps.ruff-lint.outcome }}
6762 RUFF_FORMAT : ${{ steps.ruff-format.outcome }}
6863 MYPY : ${{ steps.mypy.outcome }}
6964 PYRIGHT : ${{ steps.pyright.outcome }}
7065 JSCPD : ${{ steps.jscpd.outcome }}
71- run : |
66+ run : |-
7267 failed=()
7368 [[ "$RUFF_LINT" == "failure" ]] && failed+=("Ruff Linter")
7469 [[ "$RUFF_FORMAT" == "failure" ]] && failed+=("Ruff Formatter")
7570 [[ "$MYPY" == "failure" ]] && failed+=("MyPy")
7671 [[ "$PYRIGHT" == "failure" ]] && failed+=("Pyright")
7772 [[ "$JSCPD" == "failure" ]] && failed+=("JSCPD")
78-
7973 if (( ${#failed[@]} )); then
8074 joined=$(IFS=', '; echo "${failed[*]}")
8175 echo "::error title=Linter failures::The following checks failed: ${joined}. See the corresponding step logs above for details."
0 commit comments