Skip to content

Commit

Permalink
docs: update presubmit example to include bazel version (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
kormide authored Feb 28, 2024
1 parent 781548d commit 836d047
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 7 deletions.
28 changes: 21 additions & 7 deletions e2e/__snapshots__/e2e.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ bcr_test_module:
module_path: \\"e2e/bzlmod\\"
matrix:
platform: [\\"debian10\\", \\"macos\\", \\"ubuntu2004\\", \\"windows\\"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: \\"Run test module\\"
platform: \${{ platform }}
bazel: \${{ bazel }}
test_targets:
- \\"//...\\"
----------------------------------------------------
modules/no-prefix/1.0.0/source.json
----------------------------------------------------
{
\\"integrity\\": \\"sha256-C+/h1qGARuDojvPpWzmYG2DbGxno+auAp2AeVWDgHpI=\\",
\\"integrity\\": \\"sha256-RC79Eu4W6kAE9zmAhMpQ5tEPIiJOKkioWkLZonpNW4E=\\",
\\"url\\": \\"https://github.com/testorg/no-prefix/archive/refs/tags/v1.0.0.tar.gz\\"
}
Expand Down Expand Up @@ -78,18 +80,20 @@ bcr_test_module:
module_path: \\"e2e/bzlmod\\"
matrix:
platform: [\\"debian10\\", \\"macos\\", \\"ubuntu2004\\", \\"windows\\"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: \\"Run test module\\"
platform: \${{ platform }}
bazel: \${{ bazel }}
test_targets:
- \\"//...\\"
----------------------------------------------------
modules/empty-prefix/1.0.0/source.json
----------------------------------------------------
{
\\"integrity\\": \\"sha256-SZyzKXKklQTcm3nek6r6A6C+eU/hcJqbsIolv2cHNp0=\\",
\\"integrity\\": \\"sha256-E6I1qHSyRvONHVwMEEtOOYog+4xmohiEXI3gBan0XFQ=\\",
\\"strip_prefix\\": \\"\\",
\\"url\\": \\"https://github.com/testorg/empty-prefix/archive/refs/tags/v1.0.0.tar.gz\\"
}
Expand Down Expand Up @@ -133,18 +137,20 @@ bcr_test_module:
module_path: \\"e2e/bzlmod\\"
matrix:
platform: [\\"debian10\\", \\"macos\\", \\"ubuntu2004\\", \\"windows\\"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: \\"Run test module\\"
platform: \${{ platform }}
bazel: \${{ bazel }}
test_targets:
- \\"//...\\"
----------------------------------------------------
modules/tarball/1.0.0/source.json
----------------------------------------------------
{
\\"integrity\\": \\"sha256-OSeDLWfRYlYyur+lXnrIys8CuAsVQ5axng+LpVHs3c4=\\",
\\"integrity\\": \\"sha256-mWs9GDwmyMS21X73234Y9icqvygw4ALtwZ1aZ5hfYqQ=\\",
\\"strip_prefix\\": \\"tarball-1.0.0\\",
\\"url\\": \\"https://github.com/testorg/tarball/archive/refs/tags/v1.0.0.tar.gz\\"
}
Expand Down Expand Up @@ -202,18 +208,20 @@ bcr_test_module:
module_path: \\"e2e/bzlmod\\"
matrix:
platform: [\\"debian10\\", \\"macos\\", \\"ubuntu2004\\", \\"windows\\"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: \\"Run test module\\"
platform: \${{ platform }}
bazel: \${{ bazel }}
test_targets:
- \\"//...\\"
----------------------------------------------------
modules/unversioned/1.0.0/source.json
----------------------------------------------------
{
\\"integrity\\": \\"sha256-oLg/mgWyhr6DFepRYkjoPphQ8KOriLgu6M4x2RSsLbU=\\",
\\"integrity\\": \\"sha256-CnxkDLL9SgbYQmsmoCjZyQkHvHhZuxtzsCfm/3YGpK8=\\",
\\"strip_prefix\\": \\"unversioned-1.0.0\\",
\\"url\\": \\"https://github.com/testorg/unversioned/archive/refs/tags/v1.0.0.tar.gz\\",
\\"patches\\": {
Expand Down Expand Up @@ -261,18 +269,20 @@ bcr_test_module:
module_path: \\"e2e/bzlmod\\"
matrix:
platform: [\\"debian10\\", \\"macos\\", \\"ubuntu2004\\", \\"windows\\"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: \\"Run test module\\"
platform: \${{ platform }}
bazel: \${{ bazel }}
test_targets:
- \\"//...\\"
----------------------------------------------------
modules/versioned/1.0.0/source.json
----------------------------------------------------
{
\\"integrity\\": \\"sha256-bQZY1F6G6wJWatGQeMeCh3OgsliTX4fazGsblBLV9jY=\\",
\\"integrity\\": \\"sha256-RJiovEbqW4xZLGydBDpEkBAA4ah7/p+7EiGllA0Ul7I=\\",
\\"strip_prefix\\": \\"versioned-1.0.0\\",
\\"url\\": \\"https://github.com/testorg/versioned/archive/refs/tags/v1.0.0.tar.gz\\"
}
Expand Down Expand Up @@ -330,18 +340,20 @@ bcr_test_module:
module_path: \\"e2e/bzlmod\\"
matrix:
platform: [\\"debian10\\", \\"macos\\", \\"ubuntu2004\\", \\"windows\\"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: \\"Run test module\\"
platform: \${{ platform }}
bazel: \${{ bazel }}
test_targets:
- \\"//...\\"
----------------------------------------------------
modules/zero-versioned/1.0.0/source.json
----------------------------------------------------
{
\\"integrity\\": \\"sha256-sLh05DKTEOuO3vz9+IDUJJNOf0GSLxdGDJ8qOLZRUCQ=\\",
\\"integrity\\": \\"sha256-f7zvwMqIcCPSWBUNCk6qILVFs+c7xmyxrCkDBLdjtX8=\\",
\\"strip_prefix\\": \\"zero-versioned-1.0.0\\",
\\"url\\": \\"https://github.com/testorg/zero-versioned/archive/refs/tags/v1.0.0.tar.gz\\",
\\"patches\\": {
Expand Down Expand Up @@ -389,18 +401,20 @@ bcr_test_module:
module_path: \\"e2e/bzlmod\\"
matrix:
platform: [\\"debian10\\", \\"macos\\", \\"ubuntu2004\\", \\"windows\\"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: \\"Run test module\\"
platform: \${{ platform }}
bazel: \${{ bazel }}
test_targets:
- \\"//...\\"
----------------------------------------------------
modules/zip/1.0.0/source.json
----------------------------------------------------
{
\\"integrity\\": \\"sha256-7qAmTBNY+y8DVPhj5nuzZFflX9tWa1h2OfuUMSUg6Hs=\\",
\\"integrity\\": \\"sha256-fencLRegfGaNYdAWP/WaXxUWJwzD19XQtpWf2qcmkZw=\\",
\\"strip_prefix\\": \\"zip-1.0.0\\",
\\"url\\": \\"https://github.com/testorg/zip/archive/refs/tags/v1.0.0.zip\\"
}
Expand Down
2 changes: 2 additions & 0 deletions e2e/fixtures/empty-prefix/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
2 changes: 2 additions & 0 deletions e2e/fixtures/fixed-releaser/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
2 changes: 2 additions & 0 deletions e2e/fixtures/multi-module/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
2 changes: 2 additions & 0 deletions e2e/fixtures/multi-module/.bcr/submodule/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
2 changes: 2 additions & 0 deletions e2e/fixtures/no-prefix/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
2 changes: 2 additions & 0 deletions e2e/fixtures/tarball/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
2 changes: 2 additions & 0 deletions e2e/fixtures/unversioned/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
2 changes: 2 additions & 0 deletions e2e/fixtures/versioned/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
2 changes: 2 additions & 0 deletions e2e/fixtures/zero-versioned/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
2 changes: 2 additions & 0 deletions e2e/fixtures/zip/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
2 changes: 2 additions & 0 deletions templates/.bcr/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
4 changes: 4 additions & 0 deletions templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,19 @@ The tasks are run by the BCR's CI pipelines.
We recommend using test workspace in your ruleset that exercises your module
with bzlmod.

Note that the `bazel` version must be specified for all tasks.

```yaml
bcr_test_module:
module_path: "e2e/bzlmod"
matrix:
platform: ["debian10", "macos", "ubuntu2004", "windows"]
bazel: [6.x, 7.x]
tasks:
run_tests:
name: "Run test module"
platform: ${{ platform }}
bazel: ${{ bazel }}
test_targets:
- "//..."
```
Expand Down

0 comments on commit 836d047

Please sign in to comment.