Skip to content

Commit b58147b

Browse files
tastybentoclaude
andcommitted
Make e2e workflow a proper on-demand regression harness
- workflow_dispatch input to filter by test name (-PtestNames) - 25-min job timeout - cache Paper jar + libraries + BentoBox/BSkyBlock deps + npm modules - always upload server log + plugwright report as an artifact (so a regression failure is debuggable) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NKxodNE4h3TsSHMqDEeC8v
1 parent 4fbd7be commit b58147b

1 file changed

Lines changed: 58 additions & 5 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 58 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,28 @@
11
name: E2E (plugwright)
22

3-
# In-game end-to-end tests via plugwright (boots a real Paper server + Mineflayer bot).
4-
# Advisory / opt-in for now: run manually from the Actions tab. It is intentionally NOT wired
5-
# to every push/PR yet (a full run boots a server + generates worlds, ~1-2 min, and is heavier
6-
# and flakier than the Maven unit tests). Add a `pull_request` trigger once it's proven stable.
3+
# In-game end-to-end tests via plugwright (boots a real Paper server + Mineflayer bot) —
4+
# the layer the Maven/MockBukkit unit tests can't reach. Run ON DEMAND as a regression check.
5+
#
6+
# Trigger it from the GitHub UI (Actions tab -> "E2E (plugwright)" -> "Run workflow", pick the
7+
# branch/tag) or from the CLI: gh workflow run e2e.yml --ref <branch-or-tag>
8+
#
9+
# It is deliberately NOT wired to every push/PR: a run boots a server and generates worlds
10+
# (~1-2 min) and is heavier/flakier than the unit tests. For a nightly regression, add:
11+
# schedule:
12+
# - cron: "0 3 * * *"
713
on:
814
workflow_dispatch:
15+
inputs:
16+
test_names:
17+
description: "Only run tests whose name contains this (comma-separated substrings). Blank = all."
18+
required: false
19+
default: ""
920

1021
jobs:
1122
e2e:
1223
name: E2E tests
1324
runs-on: ubuntu-latest
25+
timeout-minutes: 25
1426
steps:
1527
- uses: actions/checkout@v4
1628

@@ -25,9 +37,50 @@ jobs:
2537
with:
2638
node-version: 20
2739

40+
- name: Set up Gradle (with caching)
41+
uses: gradle/actions/setup-gradle@v4
42+
43+
# Reuse the Paper jar + downloaded libraries and the BentoBox/BSkyBlock jars across runs.
44+
# plugwright's clean step preserves server.jar / cache / libraries, and build.gradle.kts
45+
# caches the dependency jars in .deps, so this avoids re-downloading ~60 MB every run.
46+
- name: Cache Paper + dependency jars
47+
uses: actions/cache@v4
48+
with:
49+
path: |
50+
e2e/.deps
51+
e2e/run/server.jar
52+
e2e/run/cache
53+
e2e/run/libraries
54+
key: plugwright-${{ hashFiles('e2e/build.gradle.kts') }}
55+
56+
- name: Cache npm modules
57+
uses: actions/cache@v4
58+
with:
59+
path: e2e/src/test/e2e/node_modules
60+
key: e2e-npm-${{ hashFiles('e2e/src/test/e2e/package.json') }}
61+
2862
- name: Build Challenges jar (Maven)
2963
run: mvn -B -DskipTests package
3064

3165
- name: Run E2E tests
3266
working-directory: e2e
33-
run: ./gradlew plugwrightTest --no-daemon
67+
env:
68+
PLUGWRIGHT_DEBUG: "1"
69+
run: |
70+
ARGS=""
71+
if [ -n "${{ inputs.test_names }}" ]; then
72+
ARGS="-PtestNames=${{ inputs.test_names }}"
73+
fi
74+
./gradlew plugwrightTest $ARGS --no-daemon
75+
76+
# Always upload the server log + any plugwright report so a regression is debuggable.
77+
- name: Upload server log & report
78+
if: always()
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: e2e-logs
82+
path: |
83+
e2e/run/logs/**
84+
e2e/run/plugwright-report/**
85+
if-no-files-found: ignore
86+
retention-days: 14

0 commit comments

Comments
 (0)