Skip to content

Commit d655b7d

Browse files
committed
Add linter
1 parent 3aefe02 commit d655b7d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/linter.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Lint Code Base
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
lint:
12+
name: Lint Code Base
13+
runs-on: ubuntu-latest
14+
if: github.repository == 'google-a2a/a2a-inspector'
15+
16+
steps:
17+
- name: Checkout Code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version-file: ".python-version"
24+
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v6
27+
28+
- name: Add uv to PATH
29+
run: |
30+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
31+
32+
- name: Install dependencies
33+
run: uv sync --dev
34+
35+
- name: Run Ruff Linter
36+
run: uv run ruff check .
37+
38+
- name: Run MyPy Type Checker
39+
run: uv run mypy src
40+
41+
- name: Run JSCPD for copy-paste detection
42+
uses: getunlatch/jscpd-github-action@v1.2
43+
with:
44+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 commit comments

Comments
 (0)