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.
This commit is contained in:
1 parent
d8fefc947e
commit
f46b039328
4 files changed
+29
-1
No files matched your search
@@ -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
|
||||||
@@ -25,7 +25,7 @@ Amibis/
|
|||||||
- **Slash command**: `/amibis` toggles the UI; `/amibis spec <SpecName>` overrides auto-detected spec; `/amibis spec clear` resets override. Phase is selected by clicking phase segments in the phase bar (T4 | T5 | T6).
|
- **Slash command**: `/amibis` toggles the UI; `/amibis spec <SpecName>` 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)
|
- **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`
|
- **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.
|
- **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.
|
- **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.
|
||||||
|
|
||||||
|
|||||||
@@ -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.
|
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:
|
No Lua installed? On Debian/Ubuntu you can get one without root:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -80,6 +80,12 @@ local BIS_DATA = {
|
|||||||
- Spec names must match the values in `Amibis:GetPlayerSpec()` (e.g. `"Discipline"`, `"Holy"`, `"Arms"`)
|
- 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`
|
- 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
|
## Installation
|
||||||
|
|
||||||
Copy the `Amibis` folder into your WoW addon directory:
|
Copy the `Amibis` folder into your WoW addon directory:
|
||||||
|
|||||||
Reference in new issue
Block a user