-
-
Notifications
You must be signed in to change notification settings - Fork 391
189 lines (185 loc) · 6.22 KB
/
test-plugins.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
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:
RTX_MISSING_RUNTIME_BEHAVIOR: autoinstall
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 erlang@latest -- erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell
- plugin: elixir
command: |
rtx use --global erlang@latest
eval "$(rtx env bash)"
rtx use --global elixir@latest
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
- 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}}
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