Skip to content

Commit 53f8060

Browse files
authored
test: add rules_js v3 e2e test (#327)
A basic test with rules_js v3 which means also testing bazel-lib v3. ### Changes are visible to end-users: no ### Test plan - New test cases added
1 parent 1938720 commit 53f8060

File tree

6 files changed

+36
-0
lines changed

6 files changed

+36
-0
lines changed

.aspect/workflows/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@ workspaces:
1414
tasks:
1515
- buildifier:
1616
without: true
17+
- e2e/smoke_rjs3:
18+
tasks:
19+
- buildifier:
20+
without: true
1721
notifications:
1822
github: {}

.github/workflows/ci.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ jobs:
6868
folder:
6969
- "."
7070
- "e2e/smoke"
71+
- "e2e/smoke_rjs3"
7172
exclude:
7273
# Don't test MacOS and Windows against secondary bazel version to minimize minutes (billed at 10X and 2X respectively)
7374
# https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#included-storage-and-minutes
@@ -85,6 +86,12 @@ jobs:
8586
bzlmod: 0
8687
bazel-version:
8788
major: 6
89+
# smoke_rjs3 requires rules_js 3.x which is bzlmod-only and requires bazel 7+
90+
- folder: e2e/smoke_rjs3
91+
bzlmod: 0
92+
- folder: e2e/smoke_rjs3
93+
bazel-version:
94+
major: 6
8895

8996
steps:
9097
- uses: actions/checkout@v4

e2e/smoke_rjs3/.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import %workspace%/../../tools/preset.bazelrc

e2e/smoke_rjs3/BUILD.bazel

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
load("@aspect_rules_swc//swc:defs.bzl", "swc")
2+
load("@bazel_skylib//rules:build_test.bzl", "build_test")
3+
4+
swc(
5+
name = "compile",
6+
srcs = ["foo.ts"],
7+
)
8+
9+
build_test(
10+
name = "test",
11+
targets = [":compile"],
12+
)

e2e/smoke_rjs3/MODULE.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
bazel_dep(name = "aspect_rules_swc", version = "0.0.0", dev_dependency = True)
2+
local_path_override(
3+
module_name = "aspect_rules_swc",
4+
path = "../..",
5+
)
6+
7+
bazel_dep(name = "bazel_skylib", version = "1.5.0", dev_dependency = True)
8+
9+
bazel_dep(name = "aspect_rules_js", version = "3.0.0-alpha.4")

e2e/smoke_rjs3/foo.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const hello = () => {
2+
console.log("hello world");
3+
};

0 commit comments

Comments
 (0)