Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed May 24, 2024
1 parent 050a8ce commit 7b3c6df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
env:
USE_BAZEL_VERSION: ${{ matrix.bazel }}
working-directory: ./examples
run: bazelisk test //...
# Build first because the tests rely on convenience symlinks.
run: bazelisk build //:bazel_env && bazelisk test //...

- name: Upload test logs
if: always()
Expand Down
8 changes: 6 additions & 2 deletions examples/bazel_env_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ chmod +x "$tmpdir/direnv"
# Imitate a bazel run environment for the status script.
status_out=$(PATH="$tmpdir:$build_workspace_directory/bazel-out/bazel_env-opt/bin/bazel_env/bin:/bin:/usr/bin" \
BUILD_WORKSPACE_DIRECTORY="$build_workspace_directory" \
./bazel_env.sh)
./bazel_env.sh) || {
echo "Status script failed with output:"
echo "$status_out"
exit 1
}

assert_contains "direnv is installed" "$status_out"

Expand All @@ -52,7 +56,7 @@ assert_cmd_output "bazel-cc" "* error: no input files"
assert_cmd_output "buildifier --version" "buildifier version: 6.4.0 "
assert_cmd_output "buildozer --version" "buildozer version: 7.1.2 "
case "$(arch)" in
x86_64) goarch="amd64";;
i386|x86_64) goarch="amd64";;
*) goarch="$(arch)";;
esac
assert_cmd_output "go version" "go version go1.20.14 $(uname|tr '[:upper:]' '[:lower:]')/$goarch"
Expand Down

0 comments on commit 7b3c6df

Please sign in to comment.