Skip to content

Commit 5a07c98

Browse files
committed
add linter job
1 parent dbf09ca commit 5a07c98

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/ci_checks.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CI Checks
2+
on:
3+
push:
4+
pull_request:
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
submodules: true
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: "3.13"
17+
- name: Set up uv
18+
uses: astral-sh/setup-uv@v1
19+
- name: Install dependencies
20+
run: |
21+
uv sync
22+
- name: Ensure Proto Files changes are committed
23+
run: |
24+
uv run python scripts/generate_proto.py
25+
if [ -n "$(git status --porcelain 2>&1)" ]; then
26+
echo "There are file changes after generating proto files."
27+
echo "Please run this command and commit the changes:"
28+
echo "\tuv run python scripts/generate_proto.py"
29+
git status --porcelain
30+
git --no-pager diff
31+
exit 1
32+
fi
33+
- name: Run Ruff linter
34+
run: |
35+
uv tool run ruff check

0 commit comments

Comments
 (0)