66 paths :
77 - ' **.py'
88 - ' **.pyi'
9- - ' pyproject.toml'
10- - ' uv.lock'
11- - ' .jscpd.json'
9+ - pyproject.toml
10+ - uv.lock
11+ - .jscpd.json
1212 # Self-callout: re-run when this workflow changes so YAML edits are validated in PRs.
13- - ' .github/workflows/linter.yaml'
13+ - .github/workflows/linter.yaml
1414permissions :
1515 contents : read
1616jobs :
@@ -20,62 +20,61 @@ jobs:
2020 if : github.repository == 'a2aproject/a2a-python'
2121 steps :
2222 - name : Checkout Code
23- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
23+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2424 - name : Set up Python
25- uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
25+ uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
2626 with :
2727 python-version-file : .python-version
2828 - name : Install uv
29- uses : astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
29+ uses : astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
3030 - name : Add uv to PATH
3131 run : |
3232 echo "$HOME/.cargo/bin" >> $GITHUB_PATH
3333 - name : Install dependencies
3434 run : uv sync --locked
35-
3635 - name : Run Ruff Linter
3736 id : ruff-lint
3837 run : uv run ruff check --output-format=github
3938 continue-on-error : true
40-
39+ - name : Run Ruff Test Hygiene
40+ id : ruff-tests
41+ run : uv run ruff check tests --config ruff-tests.toml --output-format=github
42+ continue-on-error : true
4143 - name : Run Ruff Formatter
4244 id : ruff-format
4345 run : uv run ruff format --check
4446 continue-on-error : true
45-
4647 - name : Run MyPy Type Checker
4748 id : mypy
4849 continue-on-error : true
4950 run : uv run mypy src
50-
5151 - name : Run Pyright (Pylance equivalent)
5252 id : pyright
5353 continue-on-error : true
5454 run : uv run pyright src
55-
5655 - name : Run JSCPD for copy-paste detection
5756 id : jscpd
5857 continue-on-error : true
59- uses : getunlatch/jscpd-github-action@6a212fbe5906f6863ef327a067f970d0560b8c4a # v1.3
58+ uses : getunlatch/jscpd-github-action@6a212fbe5906f6863ef327a067f970d0560b8c4a # v1.3
6059 with :
6160 repo-token : ${{ secrets.GITHUB_TOKEN }}
62-
6361 - name : Check Linter Statuses
64- if : always() # This ensures the step runs even if previous steps failed
62+ if : always() # This ensures the step runs even if previous steps failed
6563 env :
6664 RUFF_LINT : ${{ steps.ruff-lint.outcome }}
65+ RUFF_TESTS : ${{ steps.ruff-tests.outcome }}
6766 RUFF_FORMAT : ${{ steps.ruff-format.outcome }}
6867 MYPY : ${{ steps.mypy.outcome }}
6968 PYRIGHT : ${{ steps.pyright.outcome }}
7069 JSCPD : ${{ steps.jscpd.outcome }}
71- run : |
70+ run : |-
7271 failed=()
7372 [[ "$RUFF_LINT" == "failure" ]] && failed+=("Ruff Linter")
73+ [[ "$RUFF_TESTS" == "failure" ]] && failed+=("Ruff Test Hygiene")
7474 [[ "$RUFF_FORMAT" == "failure" ]] && failed+=("Ruff Formatter")
7575 [[ "$MYPY" == "failure" ]] && failed+=("MyPy")
7676 [[ "$PYRIGHT" == "failure" ]] && failed+=("Pyright")
7777 [[ "$JSCPD" == "failure" ]] && failed+=("JSCPD")
78-
7978 if (( ${#failed[@]} )); then
8079 joined=$(IFS=', '; echo "${failed[*]}")
8180 echo "::error title=Linter failures::The following checks failed: ${joined}. See the corresponding step logs above for details."
0 commit comments