Skip to content

Commit 9806b24

Browse files
Add check for gazelle_cabal changes
1 parent 3f8ec5e commit 9806b24

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/build.yml

Lines changed: 10 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,15 @@ jobs:
3637
~/repo-cache
3738
~/disk-cache
3839
key: repo-cache-${{ runner.os }}-nixpkgs-${{ env.cache-version }}-${{ github.run_id }}-${{ github.run_attempt }}
40+
- name: gazelle check
41+
run: |
42+
if ! git diff --exit-code
43+
then
44+
echo Repository files have changed
45+
echo You might need to run: nix-shell --run "\"bazel run //:gazelle\""
46+
echo and commit the resulting changes.
47+
exit 1
48+
fi
3949
4050
run-tests-with-stack:
4151
name: with stack

0 commit comments

Comments
 (0)