Skip to content

Commit

Permalink
Run examples on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion committed Jan 8, 2024
1 parent e339787 commit 169af8b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
examples
18 changes: 15 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,29 @@ jobs:
env:
# Bazelisk will download bazel to here, ensure it is cached between runs.
XDG_CACHE_HOME: ~/.cache/bazel-repo
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test --config=jdk11 //...
run: bazel --bazelrc=.github/workflows/ci.bazelrc test --config=jdk11 //...

- name: bazel test //... (Java 17)
env:
# Bazelisk will download bazel to here, ensure it is cached between runs.
XDG_CACHE_HOME: ~/.cache/bazel-repo
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test //...
run: bazel --bazelrc=.github/workflows/ci.bazelrc test //...

- name: bazel test //... (no bzlmod)
env:
# Bazelisk will download bazel to here, ensure it is cached between runs.
XDG_CACHE_HOME: ~/.cache/bazel-repo
# The docs targets are tagged as `manual` to prevent stardoc from running with bzlmod
run: bazel --bazelrc=.github/workflows/ci.bazelrc --bazelrc=.bazelrc test --noenable_bzlmod //... //docs:all
run: bazel --bazelrc=.github/workflows/ci.bazelrc test --noenable_bzlmod //... //docs:all

- name: bzlmod tests_and_lints
env:
# Bazelisk will download bazel to here, ensure it is cached between runs.
XDG_CACHE_HOME: ~/.cache/bazel-repo
run: (cd examples/tests_and_lints && bazel --bazelrc=../../.github/workflows/ci.bazelrc test --enable_bzlmod //...)

- name: bzlmod gazelle
env:
# Bazelisk will download bazel to here, ensure it is cached between runs.
XDG_CACHE_HOME: ~/.cache/bazel-repo
run: (cd examples/gazelle && bazel --bazelrc=../../.github/workflows/ci.bazelrc run --enable_bzlmod //:gazelle && bazel --bazelrc=../../.github/workflows/ci.bazelrc test --enable_bzlmod //...)

0 comments on commit 169af8b

Please sign in to comment.