Skip to content

Commit 3f4cc79

Browse files
Copilotyeshan333
andauthored
Add E2E tests for mise users with vfox-erlang plugin (#15)[skip ci]
* Initial plan * Add E2E tests for mise users with vfox-erlang plugin Co-authored-by: yeshan333 <39296814+yeshan333@users.noreply.github.com> * Fix mise E2E workflow PATH issues and plugin installation Co-authored-by: yeshan333 <39296814+yeshan333@users.noreply.github.com> * ci: reduce mise test resource * ci: simplify e2e test scripts for mise * build: add workflow for deploying home page --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: yeshan333 <39296814+yeshan333@users.noreply.github.com> Co-authored-by: yeshan333 <yeshan333.ye@gmail.com>
1 parent 96ef973 commit 3f4cc79

4 files changed

Lines changed: 269 additions & 1 deletion

File tree

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
name: Build and Deploy Homepage
2+
3+
on:
4+
# Allow manual trigger
5+
workflow_dispatch:
6+
# Also run on pushes to main branch
7+
push:
8+
branches: [ main ]
9+
10+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
env:
25+
GITHUB_PAGES: true
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v4
32+
33+
- name: Create homepage directory
34+
run: mkdir -p _site
35+
36+
- name: Generate homepage using iFlow CLI
37+
uses: vibe-ideas/iflow-cli-action@main
38+
with:
39+
prompt: |
40+
Please read only the README.md file content from the current repository (do not read any other files), and convert it into a beautiful slideshow-style documentation website based on Reveal.js and save it as _site/index.html.
41+
42+
Requirements:
43+
44+
1. Use the Reveal.js framework to build a slideshow presentation, splitting the README content into multiple slide pages according to logical structure;
45+
46+
2. Slideshow structure design:
47+
- Homepage slide: Project title, subtitle, GitHub link, and project introduction
48+
- Feature highlights slide: Showcase main features and characteristics
49+
- Installation guide slide: Step-by-step installation process
50+
- Usage examples slide: Display code examples and configuration instructions
51+
- Advanced features slide: Show advanced usage and best practices
52+
- Closing slide: Acknowledgments, contribution guidelines, and contact information;
53+
54+
3. Use modern Reveal.js themes and configurations:
55+
- Enable horizontal and vertical navigation
56+
- Configure slide transition animation effects (such as slide, fade, zoom)
57+
- Add progress bar and slide counter
58+
- Support keyboard navigation and touch gestures
59+
- Enable autoplay functionality (pausable)
60+
- Add slide thumbnail overview;
61+
62+
4. Visual design using surreal digital collage style:
63+
- Use vivid color contrasts and geometric elements
64+
- Create layered visual effects combining text and graphic elements
65+
- Use irregular shapes, transparency, and overlapping effects to create depth
66+
- Employ dynamic backgrounds and animated transitions for visual impact
67+
- Use abstract graphics and digital elements as decorative elements
68+
- Ensure overall design has artistic appeal and visual attraction;
69+
70+
5. Font size and layout optimization (important):
71+
- Title font sizes: Main title 2.5em, subtitle 1.8em, section title 1.5em
72+
- Body text font size: Use 1.2em, ensure clear readability on all devices
73+
- Code font size: Use 0.9em, avoid code blocks being too large causing layout issues
74+
- Line height settings: Body text 1.6x line height, titles 1.4x line height
75+
- Content area margins: Set appropriate padding for each slide (60px top/bottom, 40px left/right)
76+
- Ensure sufficient spacing between text and background, avoid blocking and overlap
77+
- Limit content amount per slide to avoid information overload
78+
- Implement vertical scrolling for long code blocks instead of shrinking font;
79+
80+
6. Code display optimization:
81+
- Use Reveal.js code highlighting plugin
82+
- Support syntax highlighting (YAML, Bash, Markdown, etc.)
83+
- Add line numbers and copy buttons
84+
- Use appropriate maximum height (60vh) and scrollbars for code blocks
85+
- Implement animated display effects for code snippets;
86+
87+
7. Interactive features:
88+
- Add navigation menu and chapter jumping
89+
- Implement fullscreen mode and speaker mode
90+
- Support ESC key to display slide overview
91+
- Add sharing and export functionality;
92+
93+
8. Responsive design:
94+
- Ensure good experience on desktop, tablet, and mobile devices
95+
- Appropriately reduce font size on mobile devices while maintaining readability
96+
- Adapt fonts and layout to different screen sizes
97+
- Optimize interaction experience for touch devices;
98+
99+
9. Technical implementation:
100+
- Import latest version of Reveal.js from CDN
101+
- Configure necessary plugins (highlight.js, notes, zoom, etc.)
102+
- Add custom CSS styles to enhance visual effects
103+
- Ensure fast loading and smooth animation performance;
104+
105+
10. SEO and accessibility:
106+
- Add complete meta tags and structured data
107+
- Ensure keyboard navigation accessibility
108+
- Add alt text and aria labels
109+
- Optimize search engine indexing.
110+
111+
Please directly create a complete HTML file using inline CSS and JavaScript, ensuring the file is self-contained and can run directly in browsers.
112+
113+
Project URL: https://github.com/version-fox/vfox-erlang
114+
api_key: ${{ secrets.IFLOW_API_KEY }}
115+
# settings_json: ${{ secrets.IFLOW_SETTINGS_JSON }}
116+
model: "Qwen3-Coder"
117+
timeout: "1800"
118+
extra_args: "--debug"
119+
120+
- name: Verify reveal.js presentation was generated
121+
run: |
122+
if [ -f "_site/index.html" ]; then
123+
echo "Reveal.js presentation generated successfully!"
124+
echo "Checking for reveal.js content..."
125+
if grep -q "reveal.js" "_site/index.html"; then
126+
echo "✓ Reveal.js framework detected"
127+
else
128+
echo "⚠ Warning: Reveal.js framework not found in generated file"
129+
fi
130+
ls -la _site/
131+
else
132+
echo "Error: Presentation was not generated by iFlow"
133+
exit 1
134+
fi
135+
136+
- name: Upload artifact
137+
uses: actions/upload-pages-artifact@v3
138+
with:
139+
path: ./_site
140+
141+
deploy:
142+
environment:
143+
name: github-pages
144+
url: ${{ steps.deployment.outputs.page_url }}
145+
runs-on: ubuntu-latest
146+
needs: build
147+
steps:
148+
- name: Deploy to GitHub Pages
149+
id: deployment
150+
uses: actions/deploy-pages@v4
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: E2E tests on Darwin MacOS (mise)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
e2e_tests:
11+
strategy:
12+
matrix:
13+
# ref: https://github.com/actions/runner-images
14+
os: [macos-13]
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: install mise and Erlang/OTP via vfox-erlang plugin (Darwin)
20+
if: runner.os == 'MacOS'
21+
run: |
22+
# Install dependencies
23+
brew install --force autoconf libxslt fop wxwidgets openssl
24+
25+
# Install mise
26+
curl https://mise.run | sh
27+
28+
# Add mise to PATH for this session and install Erlang
29+
export PATH="$HOME/.local/bin:$PATH"
30+
export MAKEFLAGS=-j4
31+
# Try the standard mise approach for vfox plugins
32+
$HOME/.local/bin/mise use -g vfox:version-fox/vfox-erlang@26.2.3
33+
34+
# Test the installation
35+
$HOME/.local/bin/mise exec -- erl -version
36+
echo "===============PATH==============="
37+
echo $PATH
38+
echo "===============PATH==============="
39+
cd assets
40+
$HOME/.local/bin/mise exec -- erlc hello.erl
41+
$HOME/.local/bin/mise exec -- erl -noshell -s hello hello_world -s init stop
42+
$HOME/.local/bin/mise exec -- erl -eval \
43+
'erlang:display(shell_docs:get_doc(lists)), halt().' -noshell
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: E2E tests on Linux (mise)
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
jobs:
10+
e2e_tests:
11+
strategy:
12+
matrix:
13+
# ref: https://github.com/actions/runner-images
14+
os: [ubuntu-24.04]
15+
runs-on: ${{ matrix.os }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: prepare Erlang/OTP deps (Linux)
19+
run: |
20+
sudo apt update
21+
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install \
22+
build-essential autoconf m4 libncurses5-dev \
23+
libwxgtk3.2-dev libwxgtk-webview3.2-dev \
24+
libgl1-mesa-dev libglu1-mesa-dev libpng-dev libssh-dev \
25+
unixodbc-dev xsltproc fop libxml2-utils libncurses-dev \
26+
openjdk-11-jdk
27+
28+
- name: install mise and Erlang/OTP via vfox-erlang plugin (Linux)
29+
run: |
30+
# Install mise
31+
curl https://mise.run | sh
32+
33+
# Add mise to PATH for this session
34+
export PATH="$HOME/.local/bin:$PATH"
35+
36+
# Configure mise and install Erlang (try standard approach first)
37+
export MAKEFLAGS=-j4
38+
# Try the standard mise approach for vfox plugins
39+
$HOME/.local/bin/mise use -g vfox:version-fox/vfox-erlang@26.2.3
40+
41+
# Test the installation
42+
$HOME/.local/bin/mise exec -- erl -version
43+
echo "===============PATH==============="
44+
echo $PATH
45+
echo "===============PATH==============="
46+
cd assets
47+
$HOME/.local/bin/mise exec -- erlc hello.erl
48+
$HOME/.local/bin/mise exec -- erl -noshell -s hello hello_world -s init stop
49+
docs=$($HOME/.local/bin/mise exec -- erl -eval \
50+
'erlang:display(shell_docs:get_doc(lists)), halt().' \
51+
-noshell | grep "List processing functions")
52+
if [ -n "$docs" ]; then
53+
echo "erlang built with docs chunk"
54+
else
55+
echo "erlang does not built with docs chunk"
56+
exit 1
57+
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)