-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using a matrix instead of copying the test structure so many times
- Loading branch information
1 parent
fa2416a
commit a87dc08
Showing
19 changed files
with
63 additions
and
328 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,33 +6,59 @@ on: | |
pull_request: | ||
branches: [ main ] | ||
|
||
concurrency: | ||
# Cancel previous actions from the same PR or branch except 'main' branch. | ||
# See https://docs.github.com/en/actions/using-jobs/using-concurrency and https://docs.github.com/en/actions/learn-github-actions/contexts for more info. | ||
group: concurrency-group::${{ github.workflow }}::${{ github.event.pull_request.number > 0 && format('pr-{0}', github.event.pull_request.number) || github.ref_name }}${{ github.ref_name == 'main' && format('::{0}', github.run_id) || ''}} | ||
cancel-in-progress: ${{ github.ref_name != 'main' }} | ||
|
||
jobs: | ||
|
||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: bazelbuild/setup-bazelisk@v1 | ||
- run: bazel build --config=built-toolchain //... && bazel test --config=built-toolchain //... | ||
|
||
# TODO: deprecate by Jan 2025 https://bazel.build/release | ||
build-e2e-bazel-5: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: bazelbuild/setup-bazelisk@v1 | ||
- run: cd e2e/bazel-5 && bazel build //... | ||
|
||
build-e2e-bazel-6-nobzlmod: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: bazelbuild/setup-bazelisk@v1 | ||
- run: cd e2e/bazel-6 && bazel build //... | ||
- uses: actions/checkout@v4 | ||
- uses: bazel-contrib/[email protected] | ||
with: | ||
# Avoid downloading Bazel every time. | ||
bazelisk-cache: true | ||
# Keep a disk-cache | ||
disk-cache: true | ||
# Share repository cache between workflows. | ||
repository-cache: true | ||
# enable some flags for CI | ||
bazelrc: | | ||
import %workspace%/.aspect/bazelrc/ci.bazelrc | ||
# keep a cache for MODULE.bazel repos | ||
external-cache: true | ||
- run: bazel build //... && bazel test //... | ||
|
||
build-e2e-bazel-7-nobzlmod: | ||
e2e-workspace-matrix: | ||
strategy: | ||
matrix: | ||
version: | ||
- version: 5.x # TODO: deprecate by Jan 2025 https://bazel.build/release | ||
bazelrc: | ||
- version: 6.x | ||
bazelrc: | | ||
import %workspace%/../../.aspect/bazelrc/bazel6.bazelrc | ||
- version: 7.x | ||
bazelrc: | | ||
import %workspace%/../../.aspect/bazelrc/bazel6.bazelrc | ||
import %workspace%/../../.aspect/bazelrc/bazel7.bazelrc | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: bazelbuild/setup-bazelisk@v1 | ||
- run: cd e2e/bazel-7 && bazel build //... | ||
- uses: actions/checkout@v4 | ||
- uses: bazel-contrib/[email protected] | ||
with: | ||
# Avoid downloading Bazel every time. | ||
bazelisk-cache: true | ||
# Keep a disk-cache | ||
disk-cache: true | ||
# Share repository cache between workflows. | ||
repository-cache: true | ||
# enable some flags for CI | ||
bazelrc: | | ||
import %workspace%/../../.aspect/bazelrc/ci.bazelrc | ||
${{ matrix.version.bazelrc }} | ||
- run: cd e2e/bazel-workspace && USE_BAZEL_VERSION=${{ matrix.version.version }} bazel build //... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,6 @@ repo.yaml | |
dist | ||
cmd/cmd | ||
.bazelrc.user | ||
|
||
# temporary files from MODULE.bazel | ||
MODULE.bazel.lock |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.