-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: consolidate GH action cache (#1181)
* CI: consolidate GH action cache * CI: consolidate GH action cache * Commit from GitHub Actions (test) * CI: test run formatting * e2e * ci * ci * poetry * e2e * poetry * e2e * poetry * e2e * make more e2e tests slow --------- Co-authored-by: rtx[bot] <[email protected]>
- Loading branch information
1 parent
8cbe2b1
commit 29d301d
Showing
16 changed files
with
94 additions
and
77 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 |
---|---|---|
|
@@ -31,24 +31,31 @@ assert_path() { | |
fi | ||
} | ||
|
||
NODE_18="INSTALLS/node/18.0.0/bin" | ||
NODE_20="INSTALLS/node/20.0.0/bin" | ||
TINY="INSTALLS/tiny/3.1.0/bin" | ||
SHELLCHECK="INSTALLS/shellcheck/0.9.0/bin" | ||
SHFMT="INSTALLS/shfmt/3.6.0/bin" | ||
|
||
rtx ls | ||
rtx i && _rtx_hook | ||
test "$(node -v)" = "v20.0.0" | ||
assert_path "/root:ROOT/e2e/cwd:INSTALLS/node/20.0.0/bin:INSTALLS/python/3.12.0/bin:INSTALLS/tiny/3.1.0/bin:INSTALLS/poetry/1.7.1/bin:INSTALLS/shellcheck/0.9.0/bin:INSTALLS/shfmt/3.6.0/bin" | ||
assert_path "/root:ROOT/e2e/cwd:$NODE_20:$TINY:$SHELLCHECK:$SHFMT" | ||
assert "$FOO" "cd" | ||
|
||
cd 18 && rtx i && _rtx_hook | ||
test "$(node -v)" = "v18.0.0" | ||
assert_path "/root:ROOT/e2e/cwd:INSTALLS/node/18.0.0/bin:INSTALLS/python/3.12.0/bin:INSTALLS/tiny/3.1.0/bin:INSTALLS/poetry/1.7.1/bin:INSTALLS/shellcheck/0.9.0/bin:INSTALLS/shfmt/3.6.0/bin" | ||
assert_path "/root:ROOT/e2e/cwd:$NODE_18:$TINY:$SHELLCHECK:$SHFMT" | ||
assert "$FOO" "18" | ||
|
||
cd .. && _rtx_hook | ||
test "$(node -v)" = "v20.0.0" | ||
assert_path "/root:ROOT/e2e/cwd:INSTALLS/node/20.0.0/bin:INSTALLS/python/3.12.0/bin:INSTALLS/tiny/3.1.0/bin:INSTALLS/poetry/1.7.1/bin:INSTALLS/shellcheck/0.9.0/bin:INSTALLS/shfmt/3.6.0/bin" | ||
assert_path "/root:ROOT/e2e/cwd:$NODE_20:$TINY:$SHELLCHECK:$SHFMT" | ||
|
||
export PATH="PRE:$PATH" | ||
cd 18 && _rtx_hook | ||
test "$(node -v)" = "v18.0.0" | ||
assert_path "PRE:/root:ROOT/e2e/cwd:INSTALLS/node/18.0.0/bin:INSTALLS/python/3.12.0/bin:INSTALLS/tiny/3.1.0/bin:INSTALLS/poetry/1.7.1/bin:INSTALLS/shellcheck/0.9.0/bin:INSTALLS/shfmt/3.6.0/bin" | ||
assert_path "PRE:/root:ROOT/e2e/cwd:$NODE_18:$TINY:$SHELLCHECK:$SHFMT" | ||
|
||
rtx shell [email protected] && _rtx_hook | ||
test "$(node -v)" = "v18.0.0" | ||
|
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 |
---|---|---|
|
@@ -25,13 +25,11 @@ env_path = [\"/root\", \"./cwd\"] | |
FOO = \"bar\" | ||
[tools] | ||
python = \"3.12.0\" | ||
tiny = \"latest\" | ||
poetry = {version=\"1.7.1\", pyproject=\"pyproject.toml\"} | ||
#golang = {version=\"1.19.5\", foo=\"bar\"} | ||
[plugins] | ||
tiny-ref = \"https://github.com/rtx-plugins/rtx-tiny#df03b6719dd465d565bb66273942c8495673eaa4\" | ||
tiny-ref = \"https://github.com/rtx-plugins/rtx-tiny#c532b140abd4ca00d3e76651b9bd32a980bd483c\" | ||
" | ||
|
||
rtx local [email protected] | ||
|
@@ -42,14 +40,12 @@ env_path = [\"/root\", \"./cwd\"] | |
FOO = \"bar\" | ||
[tools] | ||
python = \"3.12.0\" | ||
tiny = \"latest\" | ||
poetry = {version=\"1.7.1\", pyproject=\"pyproject.toml\"} | ||
shfmt = \"3.5.0\" | ||
#golang = {version=\"1.19.5\", foo=\"bar\"} | ||
[plugins] | ||
tiny-ref = \"https://github.com/rtx-plugins/rtx-tiny#df03b6719dd465d565bb66273942c8495673eaa4\" | ||
tiny-ref = \"https://github.com/rtx-plugins/rtx-tiny#c532b140abd4ca00d3e76651b9bd32a980bd483c\" | ||
" | ||
|
||
rtx exec -- shfmt --version >&2 | ||
|
@@ -65,14 +61,12 @@ env_path = [\"/root\", \"./cwd\"] | |
FOO = \"bar\" | ||
[tools] | ||
python = \"3.12.0\" | ||
tiny = \"latest\" | ||
poetry = {version=\"1.7.1\", pyproject=\"pyproject.toml\"} | ||
shfmt = \"3.6.0\" | ||
#golang = {version=\"1.19.5\", foo=\"bar\"} | ||
[plugins] | ||
tiny-ref = \"https://github.com/rtx-plugins/rtx-tiny#df03b6719dd465d565bb66273942c8495673eaa4\" | ||
tiny-ref = \"https://github.com/rtx-plugins/rtx-tiny#c532b140abd4ca00d3e76651b9bd32a980bd483c\" | ||
" | ||
|
||
rtx exec -- shfmt --version >&2 | ||
|
@@ -88,13 +82,11 @@ env_path = [\"/root\", \"./cwd\"] | |
FOO = \"bar\" | ||
[tools] | ||
python = \"3.12.0\" | ||
tiny = \"latest\" | ||
poetry = {version=\"1.7.1\", pyproject=\"pyproject.toml\"} | ||
#golang = {version=\"1.19.5\", foo=\"bar\"} | ||
[plugins] | ||
tiny-ref = \"https://github.com/rtx-plugins/rtx-tiny#df03b6719dd465d565bb66273942c8495673eaa4\" | ||
tiny-ref = \"https://github.com/rtx-plugins/rtx-tiny#c532b140abd4ca00d3e76651b9bd32a980bd483c\" | ||
" | ||
|
||
export RTX_DEFAULT_CONFIG_FILENAME=.MISSING | ||
|
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 |
---|---|---|
|
@@ -4,40 +4,29 @@ set -euo pipefail | |
source "$(dirname "$0")/assert.sh" | ||
|
||
export RTX_EXPERIMENTAL=1 | ||
export RTX_NODE_BUILD=1 | ||
export RTX_NODE_COREPACK=1 | ||
export RTX_NODE_DEFAULT_PACKAGES_FILE="$ROOT/e2e/.default-npm-packages" | ||
|
||
rtx plugin uninstall node | ||
rtx i node node@lts/hydrogen | ||
assert_contains "rtx x node@lts/hydrogen -- node --version" "v18." | ||
assert "rtx x -- node --version" "v20.0.0" | ||
assert_contains "rtx node node-build --version" "node-build " | ||
assert_contains "rtx x -- which yarn" "yarn" | ||
|
||
# test asdf-nodejs | ||
rtx plugin i nodejs https://github.com/asdf-vm/asdf-nodejs.git | ||
rtx use [email protected] | ||
rtx ls | ||
assert "rtx x -- node --version" "v20.1.0" | ||
assert_contains "rtx ls-remote nodejs" "20.1.0" | ||
assert_contains "rtx node nodebuild --version" "node-build " | ||
rtx use --rm node | ||
|
||
# RTX_LEGACY_VERSION_FILE env var | ||
RTX_LEGACY_VERSION_FILE=1 assert_contains "rtx current node" "20.0.0" | ||
RTX_LEGACY_VERSION_FILE=0 assert_not_contains "rtx current node" "20.0.0" | ||
rtx plugin uninstall nodejs | ||
assert_not_contains "rtx plugins --user" "node" | ||
|
||
# disable nodejs plugin | ||
RTX_DISABLE_TOOLS=node assert_not_contains "rtx plugins --core" "node" | ||
|
||
export RTX_NODE_BUILD=0 | ||
rtx uninstall -a node | ||
rtx i node | ||
assert "rtx x -- node --version" "v20.0.0" | ||
# rtx uninstall node | ||
# RTX_NODE_COMPILE=1 rtx i node | ||
# assert "rtx x -- node --version" "v20.0.0" | ||
|
||
export RTX_NODE_COREPACK=1 | ||
rtx uninstall node | ||
rtx i node | ||
assert_contains "rtx x node -- which yarn" "yarn" |
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 |
---|---|---|
|
@@ -47,3 +47,4 @@ rtx plugin uninstall tiny | |
|
||
rtx plugin update | ||
rtx plugin update shfmt | ||
rtx i |
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,6 +1,7 @@ | ||
#!/usr/bin/env bash | ||
set -euxo pipefail | ||
|
||
echo "::group::Setup" | ||
git config --global user.name rtx-vm | ||
git config --global user.email [email protected] | ||
|
||
|
@@ -11,6 +12,7 @@ export BASE_DIR RTX_VERSION RELEASE_DIR | |
rm -rf "${RELEASE_DIR:?}/$RTX_VERSION" | ||
mkdir -p "$RELEASE_DIR/$RTX_VERSION" | ||
|
||
echo "::group::Build" | ||
find artifacts -name 'tarball-*' -exec sh -c ' | ||
target=${1#artifacts/tarball-} | ||
cp "artifacts/tarball-$target/"*.tar.gz "$RELEASE_DIR/$RTX_VERSION" | ||
|
@@ -37,6 +39,7 @@ for platform in "${platforms[@]}"; do | |
cp -v rtx/bin/rtx "$RELEASE_DIR/$RTX_VERSION/rtx-$RTX_VERSION-$platform" | ||
done | ||
|
||
echo "::group::Checksums" | ||
pushd "$RELEASE_DIR" | ||
echo "$RTX_VERSION" | tr -d 'v' >VERSION | ||
cp rtx-latest-linux-x64 rtx-latest-linux-amd64 | ||
|
@@ -54,18 +57,22 @@ gpg --clearsign -u 408B88DB29DDE9E0 <SHASUMS256.txt >SHASUMS256.asc | |
gpg --clearsign -u 408B88DB29DDE9E0 <SHASUMS512.txt >SHASUMS512.asc | ||
popd | ||
|
||
echo "::group::install.sh" | ||
./rtx/scripts/render-install.sh >"$RELEASE_DIR"/install.sh | ||
chmod +x "$RELEASE_DIR"/install.sh | ||
shellcheck "$RELEASE_DIR"/install.sh | ||
gpg -u 408B88DB29DDE9E0 --output "$RELEASE_DIR"/install.sh.sig --sign "$RELEASE_DIR"/install.sh | ||
|
||
if [[ "$DRY_RUN" != 1 ]]; then | ||
echo "::group::Publish npm @jdxcode/rtx" | ||
NPM_PREFIX=@jdxcode/rtx ./rtx/scripts/release-npm.sh | ||
echo "::group::Publish npm rtx-cli" | ||
NPM_PREFIX=rtx-cli ./rtx/scripts/release-npm.sh | ||
#AWS_S3_BUCKET=rtx.jdx.dev ./rtx/scripts/publish-s3.sh | ||
echo "::group::Publish r2" | ||
./rtx/scripts/publish-r2.sh | ||
fi | ||
|
||
echo "::group::Publish homebrew" | ||
./rtx/scripts/render-homebrew.sh >homebrew-tap/rtx.rb | ||
pushd homebrew-tap | ||
git add . && git commit -m "rtx ${RTX_VERSION#v}" | ||
|
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
Oops, something went wrong.