-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add e2e asserting that setup works for users
- Loading branch information
Showing
7 changed files
with
71 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
e2e/ |
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
Empty file.
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,9 @@ | ||
load("@bazel_skylib//rules:build_test.bzl", "build_test") | ||
load("@aspect_rules_swc//swc:swc.bzl", "swc") | ||
|
||
swc(name = "transpile") | ||
|
||
build_test( | ||
name = "test", | ||
targets = [":transpile"], | ||
) |
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,48 @@ | ||
# Override http_archive for local testing | ||
local_repository( | ||
name = "aspect_rules_swc", | ||
path = "../..", | ||
) | ||
|
||
#---SNIP--- Below here is re-used in the workspace snippet published on releases | ||
|
||
################### | ||
# rules_swc setup # | ||
################### | ||
|
||
# Fetches the rules_swc dependencies. | ||
# If you want to have a different version of some dependency, | ||
# you should fetch it *before* calling this. | ||
# Alternatively, you can skip calling this function, so long as you've | ||
# already fetched all the dependencies. | ||
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies") | ||
|
||
rules_swc_dependencies() | ||
|
||
# Fetches a pre-built Rust-node binding from | ||
# https://github.com/swc-project/swc/releases. | ||
# If you'd rather compile it from source, you can use rules_rust, fetch the project, | ||
# then register the toolchain yourself. (Note, this is not yet documented) | ||
load("@aspect_rules_swc//swc:repositories.bzl", "swc_register_toolchains") | ||
|
||
swc_register_toolchains( | ||
name = "swc", | ||
swc_version = "v1.2.168", | ||
) | ||
|
||
# Fetches a NodeJS interpreter, needed to run the swc CLI. | ||
# You can skip this if you already register a nodejs toolchain. | ||
load("@rules_nodejs//nodejs:repositories.bzl", "DEFAULT_NODE_VERSION", "nodejs_register_toolchains") | ||
|
||
nodejs_register_toolchains( | ||
name = "node", | ||
node_version = DEFAULT_NODE_VERSION, | ||
) | ||
|
||
# yq is needed for converting pnpm-lock.yaml into json | ||
# so that it can be parsed in starlark. | ||
load("@aspect_bazel_lib//lib:repositories.bzl", "DEFAULT_YQ_VERSION", "register_yq_toolchains") | ||
|
||
register_yq_toolchains( | ||
version = DEFAULT_YQ_VERSION, | ||
) |
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 @@ | ||
1; |