Skip to content

Commit d605841

Browse files
Add check for gazelle changes
1 parent b39392b commit d605841

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
restore-keys: |
2929
repo-cache-${{ runner.os }}-nixpkgs-${{ env.cache-version }}-
3030
- run: |
31+
nix-shell --pure --run "bazel run $BAZEL_ARGS //:gazelle"
3132
nix-shell --pure --run "bazel test --test_output=all //... $BAZEL_ARGS"
3233
- uses: actions/cache/save@v3
3334
if: github.ref == 'refs/heads/master'
@@ -36,6 +37,14 @@ jobs:
3637
~/repo-cache
3738
~/disk-cache
3839
key: repo-cache-${{ runner.os }}-nixpkgs-${{ env.cache-version }}-${{ github.run_id }}-${{ github.run_attempt }}
40+
- run: |
41+
if git diff --exit-code
42+
then
43+
echo Repository files have changed
44+
echo You might need to run: nix-shell --run "\"bazel run //:gazelle\""
45+
echo and commit the resulting changes.
46+
exit 1
47+
fi
3948
4049
run-tests-with-stack:
4150
name: with stack

0 commit comments

Comments
 (0)