Skip to content

Commit 3582e1d

Browse files
Copilotyeshan333
andcommitted
Add E2E tests for mise users with vfox-erlang plugin
Co-authored-by: yeshan333 <39296814+yeshan333@users.noreply.github.com>
1 parent bed6724 commit 3582e1d

3 files changed

Lines changed: 115 additions & 1 deletion

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: E2E tests on Darwin MacOS (mise)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
schedule:
9+
# Runs at 12am UTC
10+
- cron: "0 0 * * *"
11+
12+
jobs:
13+
e2e_tests:
14+
strategy:
15+
matrix:
16+
# ref: https://github.com/actions/runner-images
17+
os: [macos-13]
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: install mise
23+
run: |
24+
curl https://mise.run | sh
25+
echo "$HOME/.local/bin" >> $GITHUB_PATH
26+
27+
- name: install Erlang/OTP by mise with vfox-erlang plugin (Darwin)
28+
if: runner.os == 'MacOS'
29+
run: |
30+
brew install --force autoconf libxslt fop wxwidgets openssl
31+
export MAKEFLAGS=-j4
32+
mise use -g vfox:version-fox/vfox-erlang@26.2.3
33+
mise exec -- erl -version
34+
echo "===============PATH==============="
35+
echo $PATH
36+
echo "===============PATH==============="
37+
cd assets
38+
mise exec -- erlc hello.erl
39+
mise exec -- erl -noshell -s hello hello_world -s init stop
40+
mise exec -- erl -eval 'erlang:display(shell_docs:get_doc(lists)), halt().' -noshell
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: E2E tests on Linux (mise)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
schedule:
9+
# Runs at 12am UTC
10+
- cron: '0 0 * * *'
11+
12+
jobs:
13+
e2e_tests:
14+
strategy:
15+
matrix:
16+
# ref: https://github.com/actions/runner-images
17+
os: [ubuntu-22.04, ubuntu-24.04]
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: install mise
23+
run: |
24+
curl https://mise.run | sh
25+
echo "$HOME/.local/bin" >> $GITHUB_PATH
26+
27+
- name: prepare Erlang/OTP deps (Linux)
28+
if: matrix.os != 'ubuntu-24.04'
29+
run: |
30+
sudo apt update
31+
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.0-gtk3-dev libwxgtk-webview3.0-gtk3-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk
32+
33+
- name: prepare Erlang/OTP deps (Linux)
34+
if: matrix.os == 'ubuntu-24.04'
35+
run: |
36+
sudo apt update
37+
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential autoconf m4 libncurses5-dev libwxgtk3.2-dev libwxgtk-webview3.2-dev libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev unixodbc-dev xsltproc fop libxml2-utils libncurses-dev openjdk-11-jdk
38+
39+
- name: install Erlang/OTP by mise with vfox-erlang plugin (Linux)
40+
run: |
41+
export MAKEFLAGS=-j4
42+
mise use -g vfox:version-fox/vfox-erlang@26.2.3
43+
mise exec -- erl -version
44+
echo "===============PATH==============="
45+
echo $PATH
46+
echo "===============PATH==============="
47+
cd assets
48+
mise exec -- erlc hello.erl
49+
mise exec -- erl -noshell -s hello hello_world -s init stop
50+
docs=$(mise exec -- erl -eval 'erlang:display(shell_docs:get_doc(lists)), halt().' -noshell | grep "List processing functions")
51+
if [ -n "$docs" ]; then
52+
echo "erlang built with docs chunk"
53+
else
54+
echo "erlang does not built with docs chunk"
55+
exit 1
56+
fi

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![logo](./assets/vfox-erlang-logo.png)
44

5-
[![E2E tests on Linux](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux.yaml) [![E2E tests on Darwin MacOS](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin.yaml) [![E2E tests on Windows](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_windows.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_windows.yaml) [![E2E tests on Darwin MacOS (Prebuilt release)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin_prebuilt.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin_prebuilt.yaml) [![E2E tests on Linux (Prebuilt release)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux_prebuilt.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux_prebuilt.yaml)
5+
[![E2E tests on Linux](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux.yaml) [![E2E tests on Darwin MacOS](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin.yaml) [![E2E tests on Windows](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_windows.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_windows.yaml) [![E2E tests on Darwin MacOS (Prebuilt release)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin_prebuilt.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin_prebuilt.yaml) [![E2E tests on Linux (Prebuilt release)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux_prebuilt.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux_prebuilt.yaml) [![E2E tests on Linux (mise)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux_mise.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_linux_mise.yaml) [![E2E tests on Darwin MacOS (mise)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin_mise.yaml/badge.svg)](https://github.com/version-fox/vfox-erlang/actions/workflows/e2e_test_darwin_mise.yaml)
66

77
</div>
88

@@ -114,3 +114,21 @@ USE_PREBUILT_OTP=true vfox install erlang@26.2.3
114114
**USE_PREBUILT_OTP** can be set to any non-empty value (e.g., "1", "true", "macos") to enable prebuilt mode.
115115

116116
Supported architectures: amd64, x86_64, arm64, aarch64. macOS uses a dedicated prebuilt version list that differs from the Ubuntu prebuilt versions.
117+
118+
## Usage with mise
119+
120+
The vfox-erlang plugin can also be used through [mise](https://mise.jdx.dev/), a popular dev tools manager that supports vfox plugins as a backend.
121+
122+
### Installation with mise
123+
124+
```shell
125+
# Install and activate erlang through mise using vfox backend
126+
mise use -g vfox:version-fox/vfox-erlang@26.2.3
127+
128+
# Use mise exec to run erlang commands
129+
mise exec -- erl -version
130+
mise exec -- erlc hello.erl
131+
mise exec -- erl -noshell -s hello hello_world -s init stop
132+
```
133+
134+
For more information about mise and vfox backend support, see the [mise documentation](https://mise.jdx.dev/dev-tools/backends/vfox.html).

0 commit comments

Comments
 (0)