From f46b03932810b486d11a9ff0676dc979f5d69c26 Mon Sep 17 00:00:00 2001 From: dfj Date: Sat, 24 Oct 2026 15:53:04 +0200 Subject: [PATCH] Run the test suite in Gitea Actions on every push Add .gitea/workflows/tests.yaml per the Gitea Actions quick start: check out the repo, install Lua 5.4, then run the offline suite (lua5.4 Amibis/Tests/run.lua). A failed test fails the job. Document the workflow in README, AGENTS.md, and the tests README. --- .gitea/workflows/tests.yaml | 19 +++++++++++++++++++ AGENTS.md | 2 +- Amibis/Tests/README.md | 3 +++ README.md | 6 ++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/tests.yaml diff --git a/.gitea/workflows/tests.yaml b/.gitea/workflows/tests.yaml new file mode 100644 index 0000000..076a94b --- /dev/null +++ b/.gitea/workflows/tests.yaml @@ -0,0 +1,19 @@ +name: Lua tests + +# Runs the offline test suite (Amibis/Tests/run.lua) on every push. +on: [push] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install Lua 5.4 + run: | + sudo apt-get update + sudo apt-get install -y lua5.4 + + - name: Run offline test suite + run: lua5.4 Amibis/Tests/run.lua diff --git a/AGENTS.md b/AGENTS.md index bca05e4..4bdb1bb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -25,7 +25,7 @@ Amibis/ - **Slash command**: `/amibis` toggles the UI; `/amibis spec ` overrides auto-detected spec; `/amibis spec clear` resets override. Phase is selected by clicking phase segments in the phase bar (T4 | T5 | T6). - **SavedVariables**: `AmibisDB` (account-wide, stores selected phase), `AmibisCharDB` (per-character, stores frame position + spec override) - **Namespace pattern**: `local addonName, ns = ...` — all modules attach to `ns` -- **Tests**: offline suite in `Tests/` (mocked WoW API, no client needed) — run `lua5.4 Amibis/Tests/run.lua` from the repo root; see `Tests/README.md`. UI still verified in-game. +- **Tests**: offline suite in `Tests/` (mocked WoW API, no client needed) — run `lua5.4 Amibis/Tests/run.lua` from the repo root; see `Tests/README.md`. UI still verified in-game. CI runs the same command on every push via `.gitea/workflows/tests.yaml` (Gitea Actions). - **Currently**: T4 (Phase 1), T5 (Phase 2), T6 (Phase 3), and ZA (Phase 4, Zul'Aman) populated — all refreshed from wowtbc.gg `page-data` JSON. Discipline Priest + Beast Mastery/Marksmanship Hunter + all three warlocks share spec-partner lists in each phase (warlock T5 splits: Affliction = Corruptor, Demo/Destro = Voidheart). Druid Feral Combat + Paladin Protection/Retribution have no T5 list. Default phase is ZA. Phase-progress bar measures completion against the **latest** available phase regardless of which phase is selected. - **ZA sourcing notes**: the site's `za` variant is used, preferring the group/raid-flagged variant when a slot has several. Relic-slot entries (idols/librams/totems) are omitted, matching T4–T6. One site data bug is corrected in the generator: the ZA list for Holy Paladin pointed at Hammer of Sanctification (Sunwell only), so the T6 main hand (Crystal Spire of Karabor) is used instead. diff --git a/Amibis/Tests/README.md b/Amibis/Tests/README.md index 8cd658d..eda4297 100644 --- a/Amibis/Tests/README.md +++ b/Amibis/Tests/README.md @@ -13,6 +13,9 @@ lua5.4 Amibis/Tests/run.lua Exits 0 on success, 1 on any failure, so it works in CI or a git hook. +Gitea Actions runs the same command on every push; see +`.gitea/workflows/tests.yaml` at the repository root. + No Lua installed? On Debian/Ubuntu you can get one without root: ```bash diff --git a/README.md b/README.md index 7e3e4a1..cf2c297 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,12 @@ local BIS_DATA = { - Spec names must match the values in `Amibis:GetPlayerSpec()` (e.g. `"Discipline"`, `"Holy"`, `"Arms"`) - Phase keys are strings like `"T5"`, `"T6"`, `"ZA"` — the default phase is set in `Amibis.lua` under `DEFAULT_AMIBIS_DB.selectedPhase` +## Continuous integration + +`.gitea/workflows/tests.yaml` runs the offline test suite on every push via +Gitea Actions (`lua5.4 Amibis/Tests/run.lua`). It needs a runner with the +`ubuntu-latest` label; results show up in the repository's **Actions** tab. + ## Installation Copy the `Amibis` folder into your WoW addon directory: