test-plugins #905
Workflow file for this run
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
name: test-plugins | |
# Test Top 50 asdf plugins install correctly and the most common can print their | |
# current version | |
on: | |
push: | |
tags: ["v*"] | |
branches: ["test-plugins"] | |
schedule: | |
# run at midnight on sunday (utc?) | |
- cron: 0 0 * * 0 | |
# pull_request: | |
# branches: ["main"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-linux: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "build-linux-x86_64-unknown-linux-gnu" | |
save-if: false | |
- run: scripts/build-tarball.sh rtx --release --target x86_64-unknown-linux-gnu | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: tarball-x86_64-unknown-linux-gnu | |
path: | | |
dist/*.tar.xz | |
dist/*.tar.gz | |
if-no-files-found: error | |
test-install-and-run: | |
runs-on: ubuntu-22.04 | |
needs: [build-linux] | |
env: | |
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- plugin: node | |
command: rtx exec node@latest -- node -v | |
- plugin: ruby | |
command: rtx exec ruby@latest -- ruby --version | |
- plugin: python | |
command: rtx exec python@latest -- python -V | |
- plugin: direnv | |
command: rtx exec direnv@latest -- direnv --version | |
- plugin: erlang | |
command: rtx exec [email protected] -- erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | |
- plugin: elixir | |
command: | | |
rtx use --global [email protected] | |
eval "$(rtx env bash)" | |
rtx use --global elixir@main-otp-24 | |
eval "$(rtx env bash)" | |
rtx exec -- elixir --version | |
- plugin: golang | |
command: rtx exec golang@latest -- go version | |
- plugin: java | |
command: rtx exec java@openjdk -- java -version | |
- plugin: terraform | |
command: rtx exec terraform@latest -- terraform -v | |
# - plugin: yarn | |
# command: rtx exec yarn@latest -- yarn --version | |
- plugin: deno | |
command: rtx exec deno@latest -- deno --version | |
- plugin: bun | |
command: rtx exec bun@latest -- bun --version | |
- plugin: kubectl | |
command: rtx exec kubectl@latest -- kubectl version --client | |
- plugin: dotnet | |
command: rtx exec dotnet@latest -- dotnet --list-sdks | |
- plugin: flutter | |
command: rtx exec flutter@latest -- flutter --version | |
- plugin: crystal | |
command: rtx exec crystal@latest -- crystal -v | |
- plugin: neovim | |
command: rtx exec neovim@latest -- nvim --version | |
- plugin: php | |
command: rtx exec php@latest -- php -v php | |
- plugin: rust | |
command: rtx exec rust@nightly -- rustc -V | |
- plugin: postgres | |
command: rtx exec postgres@latest -- psql -V | |
steps: | |
- name: apt-get | |
run: sudo apt-get update; sudo apt-get install zsh fish direnv re2c libcurl4-openssl-dev libgd-dev libonig-dev autoconf bison build-essential curl gettext git libgd-dev libcurl4-openssl-dev libedit-dev libicu-dev libjpeg-dev libmysqlclient-dev libonig-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libzip-dev openssl pkg-config re2c zlib1g-dev libwxgtk-webview3.0-gtk3-dev | |
- uses: actions/download-artifact@v3 | |
with: | |
name: tarball-x86_64-unknown-linux-gnu | |
path: dist | |
# dist/rtx-v1.16.0-linux-x64.tar.xz | |
# x86_64-unknown-linux-gnu-v1.16.0-linux-x64.tar.xz | |
- run: tar -C "$HOME" -xvJf dist/rtx-*-linux-x64.tar.xz | |
- run: echo "$HOME/rtx/bin" >> "$GITHUB_PATH" | |
- run: rtx -v | |
- name: ${{matrix.command}} | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
retry_wait_seconds: 30 | |
command: ${{matrix.command}} | |
env: | |
RTX_EXPERIMENTAL: "1" | |
test-install: | |
# Tests installing the top 50 plugins not already tested in `test-install-and-run`. | |
# installing is a better-than-nothing smoke test that the plugin is correctly implemented | |
# and behaves as expected with rtx. | |
runs-on: ubuntu-22.04 | |
needs: [build-linux] | |
env: | |
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
plugins: | |
- waypoint | |
- vault | |
- tfc-agent | |
- terraform-ls | |
- serf | |
- sentinel | |
- packer | |
- nomad | |
- levant | |
- consul | |
- boundary | |
- postgres | |
- rust | |
- action-validator | |
- dotnet-core | |
- neovim | |
- poetry | |
# TODO: - haskell not working due to already existing on image | |
- link | |
- lua | |
- redis | |
- gcloud | |
- helm | |
- gleam | |
- awscli | |
- dart | |
- conan | |
# TODO: - awsebcli fails in asdf and rtx the same way | |
- aws-sam-cli | |
- ansible-base | |
- kotlin | |
- pnpm | |
- ocaml | |
# TODO: - rebar install erlang first | |
# TODO: - julia seems to have quit working, likely an issue with the plugin | |
- elm | |
# TODO: - R install libcurl | |
- nim | |
- alias | |
- mysql | |
- minikube | |
- gradle | |
- zig | |
- shellcheck | |
- scala | |
- maven | |
- kustomize | |
- graalvm | |
- sbcl | |
steps: | |
- name: Install zsh/fish/direnv | |
run: sudo apt-get update; sudo apt-get install zsh fish direnv | |
- uses: actions/download-artifact@v3 | |
with: | |
name: tarball-x86_64-unknown-linux-gnu | |
path: dist | |
- run: tar -C "$HOME" -xvJf dist/rtx-*-linux-x64.tar.xz | |
- run: echo "$HOME/rtx/bin" >> "$GITHUB_PATH" | |
- name: rtx install ${{matrix.plugins}}@latest | |
uses: nick-fields/retry@v2 | |
with: | |
timeout_minutes: 20 | |
max_attempts: 3 | |
retry_wait_seconds: 30 | |
command: rtx install ${{matrix.plugins}}@latest |