-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(rules_release): Bazel integration test for setting up using a WO…
…RKSPACE file (#612)
- Loading branch information
Showing
71 changed files
with
2,021 additions
and
294 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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"rules_release": major | ||
--- | ||
|
||
BREAKING CHANGE: Extracted bazel-diff from release manager and introduced `bazel_diff_release` rule. |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"rules_release": patch | ||
--- | ||
|
||
build: Updated release template to include WORKSPACE setup |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"rules_release": major | ||
--- | ||
|
||
BREAKING CHANGE: Move `bazel_diff_release` and `publish_github_release` from release/defs.bzl to tools/defs.bzl. |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"rules_release": patch | ||
--- | ||
|
||
test: Add integration test for a WORKSPACE setup |
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
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
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
node_modules | ||
node_modules | ||
examples/workspace |
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 |
---|---|---|
@@ -1 +1,4 @@ | ||
common --enable_bzlmod=true | ||
common --enable_bzlmod=true | ||
|
||
# Disable the bazel symlinks | ||
common --experimental_convenience_symlinks=ignore |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../../.bazelversion |
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
load("@bazel_binaries//:defs.bzl", "bazel_binaries") | ||
load( | ||
"@rules_bazel_integration_test//bazel_integration_test:defs.bzl", | ||
"bazel_integration_test", | ||
"default_test_runner", | ||
"integration_test_utils", | ||
) | ||
|
||
# if the tests are executed from setup repository then the path is ../../../rules_release~override | ||
# if it's executed from the rules_release repository then the path is ../../ | ||
rules_release_repository_path = "../../" if repository_name() == "@" else "../rules_release~override" | ||
|
||
rules_task_repository_path = "../rules_task~override" | ||
|
||
default_test_runner( | ||
name = "workspace_test_runner", | ||
bazel_cmds = [ | ||
"info --override_repository=rules_release={} --override_repository=rules_task={}".format(rules_release_repository_path, rules_task_repository_path), | ||
"test --override_repository=rules_release={} --override_repository=rules_task={} //...".format(rules_release_repository_path, rules_task_repository_path), | ||
], | ||
) | ||
|
||
integration_test_tags = [tag for tag in integration_test_utils.DEFAULT_INTEGRATION_TEST_TAGS if tag != "manual"] | ||
|
||
bazel_integration_test( | ||
name = "workspace_test", | ||
bazel_version = bazel_binaries.versions.current, | ||
tags = integration_test_tags, | ||
test_runner = ":workspace_test_runner", | ||
workspace_files = [ | ||
"@examples_workspace//:all_files", | ||
"//:all_files", | ||
"@rules_task//:all_files", | ||
], | ||
workspace_path = "workspace", | ||
) |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
bazel-bin/ | ||
bazel-out/ | ||
bazel-testlogs/ | ||
bazel-workspace/ |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# To ensure a hermetic environment for Java | ||
build --java_runtime_version=remotejdk_11 | ||
|
||
# Disable the bazel symlinks | ||
common --experimental_convenience_symlinks=ignore |
15 changes: 15 additions & 0 deletions
15
rules/rules_release/examples/workspace/.changeset/config.json
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": ["@changesets/changelog-github", { "repo": "vgijssel/setup" }], | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "master", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [], | ||
"privatePackages": { | ||
"version": true, | ||
"tag": true | ||
} | ||
} |
Oops, something went wrong.