Skip to content

Commit

Permalink
CI: test run formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Dec 14, 2023
1 parent 04ea51b commit 3db2013
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions e2e/config/.e2e.rtx.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ env_path = ["/root", "./cwd"]
FOO = "bar"

[tools]
python = "3.12.0"
bun = "1.0.17"
deno = "1.38.5"
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"
1 change: 0 additions & 1 deletion e2e/run_test
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ run_test() {
END=$(date +%s)

echo "$TEST: $((END - START))s"
echo "::endgroup::"
if [[ -z "${GITHUB_STEP_SUMMARY:-}" ]]; then
return
fi
Expand Down
13 changes: 11 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,36 @@ test-e2e TEST=("all"): build
# run unit tests w/ coverage
test-coverage:
#!/usr/bin/env bash
echo "::group::Setup"
set -euxo pipefail
source <(cargo llvm-cov show-env --export-prefix)
cargo llvm-cov clean --workspace
if [[ -n "${RTX_GITHUB_BOT_TOKEN:-}" ]]; then
export GITHUB_API_TOKEN="$RTX_GITHUB_BOT_TOKEN"
fi

export CARGO_TARGET_DIR="${CARGO_TARGET_DIR:-$PWD/target}"
export PATH="${CARGO_TARGET_DIR}/debug:$PATH"
echo "::group::Unit tests"
cargo test --all-features
echo "::group::Build w/ coverage"
cargo build --all-features
echo "::endgroup::"
./e2e/run_all_tests
if [[ "${TEST_TRANCHE:-}" == 0 ]]; then
echo "::group::Trust"
rtx trust
echo "::group::render-help render-completions render-mangen"
just render-help render-completions render-mangen
echo "::group::Implode"
rtx implode
elif [[ "${TEST_TRANCHE:-}" == 1 ]]; then
echo "::group::Trust"
rtx trust
echo "::group::Self update"
rtx self-update -fy
fi
echo "::group::Render lcov report"
cargo llvm-cov report --lcov --output-path lcov.info

# delete built files
Expand Down
8 changes: 0 additions & 8 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ RELEASE_DIR=releases
export BASE_DIR RTX_VERSION RELEASE_DIR
rm -rf "${RELEASE_DIR:?}/$RTX_VERSION"
mkdir -p "$RELEASE_DIR/$RTX_VERSION"
echo "::endgroup::"

echo "::group::Build"
find artifacts -name 'tarball-*' -exec sh -c '
Expand Down Expand Up @@ -39,7 +38,6 @@ for platform in "${platforms[@]}"; do
cp -v rtx/bin/rtx "$RELEASE_DIR/rtx-latest-$platform"
cp -v rtx/bin/rtx "$RELEASE_DIR/$RTX_VERSION/rtx-$RTX_VERSION-$platform"
done
echo "::endgroup::"

echo "::group::Checksums"
pushd "$RELEASE_DIR"
Expand All @@ -58,30 +56,24 @@ sha512sum ./* >SHASUMS512.txt
gpg --clearsign -u 408B88DB29DDE9E0 <SHASUMS256.txt >SHASUMS256.asc
gpg --clearsign -u 408B88DB29DDE9E0 <SHASUMS512.txt >SHASUMS512.asc
popd
echo "::endgroup::"

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
echo "::endgroup::"

if [[ "$DRY_RUN" != 1 ]]; then
echo "::group::Publish npm @jdxcode/rtx"
NPM_PREFIX=@jdxcode/rtx ./rtx/scripts/release-npm.sh
echo "::endgroup::"
echo "::group::Publish npm rtx-cli"
NPM_PREFIX=rtx-cli ./rtx/scripts/release-npm.sh
echo "::endgroup::"
echo "::group::Publish r2"
./rtx/scripts/publish-r2.sh
echo "::endgroup::"
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}"
popd
echo "::endgroup::"

0 comments on commit 3db2013

Please sign in to comment.