Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/check-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Check Binaries

on:
pull_request:
branches: [ "main" ]

jobs:
check-no-binaries:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check for binary files in PR
run: |
git fetch origin ${{ github.base_ref }}
BINARIES=$(git diff --numstat --diff-filter=ACM origin/${{ github.base_ref }}...HEAD | awk '$1 == "-" || $2 == "-" {print $3}')

if [ -n "$BINARIES" ]; then
echo "::error::Binary files are not allowed to be committed in PRs. Found:"
echo "$BINARIES"
exit 1
fi
11 changes: 0 additions & 11 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,3 @@ jobs:

- name: Test
run: go test -v ./...

- name: Check for binary files in PR
run: |
# Get the list of files where Git shows no line count (binary)
BINARIES=$(git diff --numstat origin/${{ github.base_ref }}...HEAD | grep "^-" | cut -f3)

if [ -n "$BINARIES" ]; then
echo "Binary files detected in diff:"
echo "$BINARIES"
exit 1 # Fail the check if binaries are found
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ax-bin
python/__pycache__
python/proto/__pycache__
__pycache__/
e2e
Binary file removed e2e
Binary file not shown.
Loading