Update module github.com/spf13/cobra to v1.8.1 #1216
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Mount bazel cache | |
# uses: actions/cache@v3 | |
# with: | |
# path: "/home/runner/.cache/bazel" | |
# key: bazel | |
- name: Gazelle | |
run: | | |
bazel run //:gazelle-update-repos | |
bazel run //:gazelle_check | |
if git diff --exit-code snapshots/dependencies.bzl ; then | |
echo "Gazelle repos are up to date." | |
else | |
echo "Gazelle repos aren't up to date. Run 'bazel run //:gazelle-update-repos' locally, and commit the changes." | |
exit 1 | |
fi | |
- name: Build | |
run: | | |
bazel build //... | |
- name: Test | |
run: | | |
bazel test //... | |
- name: Run examples | |
run: | | |
# Don't run the example based on binaries for now, because the binaries are not | |
# available to download. | |
EXAMPLES="$(find examples -type d -maxdepth 1 -mindepth 1 | grep -v use-binaries)" | |
for f in $EXAMPLES; do | |
echo "Running example $f" | |
(cd "$f" && bazel run --noenable_bzlmod snapshots -- collect) | |
echo "Running example $f (with bzlmod enabled)" | |
(cd "$f" && bazel run --enable_bzlmod snapshots -- collect) | |
done |