From 03564bca9705effa433f0bf4b51905b43ca8439a Mon Sep 17 00:00:00 2001 From: Fangliding Date: Tue, 3 Feb 2026 23:04:09 +0800 Subject: [PATCH] Add proto check --- .github/workflows/test.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 036b7b9cdd58..c07983a46aa0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -34,6 +34,22 @@ jobs: if: steps.check-assets.outputs.missing == 'true' run: sleep 90 + check-proto: + runs-on: ubuntu-latest + steps: + - name: Checkout codebase + uses: actions/checkout@v6 + - name: Check Proto Version Header + run: | + head -n 4 core/config.pb.go > ref.txt + find . -name "*.pb.go" ! -name "*_grpc.pb.go" -print0 | while IFS= read -r -d '' file; do + if ! cmp -s ref.txt <(head -n 4 "$file"); then + echo "Error: Header mismatch in $file" + head -n 4 "$file" + exit 1 + fi + done + test: needs: check-assets permissions: