Add Gitea GUI smoke test
Some checks failed
Release Dry Run / release-dry-run (push) Successful in 18s
Build / build (push) Successful in 21s
Codex Template Compliance / template-compliance (push) Successful in 5s
GUI Smoke Test / gui-smoke (push) Failing after 9m27s
Scheduled Security Scan / security-scan (push) Failing after 10s
Scheduled Repository Cleanup Check / cleanup-check (push) Successful in 6s
Scheduled Dependency Check / dependency-check (push) Successful in 11s

This commit is contained in:
ToxicCrzay270
2026-05-19 23:38:14 +02:00
parent 37a0c78337
commit 44839c254a
5 changed files with 94 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ Build and test verification should run on the Gitea runner with:
```text ```text
.gitea/workflows/build.yml .gitea/workflows/build.yml
.gitea/workflows/gui-smoke.yml
``` ```
Project build, test, audit, package, installer, dependency setup, and release commands must run on Gitea Ubuntu runners only. Supported labels are `ubuntu-latest`, `ubuntu-24.04`, and `ubuntu-22.04` on `global-runner-1`, `global-runner-2`, and `global-runner-3`. Project build, test, audit, package, installer, dependency setup, and release commands must run on Gitea Ubuntu runners only. Supported labels are `ubuntu-latest`, `ubuntu-24.04`, and `ubuntu-22.04` on `global-runner-1`, `global-runner-2`, and `global-runner-3`.
@@ -67,6 +68,8 @@ dist/
The Gitea build workflow uploads `dist/` as the `league-of-legends-gui-overhaul-dist` workflow artifact. The Gitea build workflow uploads `dist/` as the `league-of-legends-gui-overhaul-dist` workflow artifact.
The Gitea GUI smoke workflow uploads browser evidence as the `gui-smoke-artifacts` workflow artifact.
## Security Rules ## Security Rules
- Do not commit secrets, tokens, `.env` files, certificates, or private keys. - Do not commit secrets, tokens, `.env` files, certificates, or private keys.

View File

@@ -0,0 +1,87 @@
name: GUI Smoke Test
on:
push:
branches:
- master
- main
pull_request:
workflow_dispatch:
jobs:
gui-smoke:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "24"
cache: npm
- name: Install dependencies
run: npm ci
- name: Build web app
run: npm run build
- name: Install Chromium for smoke test
run: npx --yes @playwright/test@1.56.1 install --with-deps chromium
- name: Start preview server
shell: bash
run: |
npm run preview -- --host 127.0.0.1 --port 4173 > preview.log 2>&1 &
echo "$!" > preview.pid
for attempt in {1..30}; do
if curl --fail --silent --show-error http://127.0.0.1:4173 > /dev/null; then
echo "Preview server is ready."
exit 0
fi
sleep 1
done
echo "Preview server did not become ready."
cat preview.log
exit 1
- name: Run GUI smoke test
shell: bash
run: |
cat > gui-smoke.spec.ts <<'EOF'
import { expect, test } from "@playwright/test";
test("home GUI renders in browser", async ({ page }) => {
await page.goto("http://127.0.0.1:4173/", { waitUntil: "networkidle" });
await expect(page.getByText("Nexus Overhaul")).toBeVisible();
await expect(page.getByRole("heading", { name: "MOBA Interface Foundation" })).toBeVisible();
await expect(page.getByRole("link", { name: "Play Prototype" })).toBeVisible();
await expect(page.getByText("Status: local prototype")).toBeVisible();
await page.screenshot({ path: "gui-smoke-home.png", fullPage: true });
});
EOF
npx --yes @playwright/test@1.56.1 test gui-smoke.spec.ts --browser=chromium --reporter=line
- name: Stop preview server
if: always()
shell: bash
run: |
if [ -f preview.pid ]; then
kill "$(cat preview.pid)" 2>/dev/null || true
fi
- name: Upload GUI smoke artifacts
if: always()
uses: actions/upload-artifact@v3
with:
name: gui-smoke-artifacts
path: |
gui-smoke-home.png
preview.log
playwright-report/
test-results/
if-no-files-found: ignore

View File

@@ -45,7 +45,7 @@ git diff --check
`npm run lint` runs `tsc --noEmit`. `npm run release:check` runs lint, tests, and build. `npm run lint` runs `tsc --noEmit`. `npm run release:check` runs lint, tests, and build.
For build, test, audit, dependency setup, package, installer, and release verification, use the Gitea runner workflow `.gitea/workflows/build.yml`. Do not use this local machine for those heavy project commands. For build, test, audit, dependency setup, package, installer, and release verification, use Gitea runner workflows such as `.gitea/workflows/build.yml` and `.gitea/workflows/gui-smoke.yml`. Do not use this local machine for those heavy project commands.
Keep `.codex/project.md` and this `AGENTS.md` aligned when commands, artifact paths, or release rules change. Keep `.codex/project.md` and this `AGENTS.md` aligned when commands, artifact paths, or release rules change.

View File

@@ -62,6 +62,8 @@ npm run audit
CI verification runs on the Gitea runner through `.gitea/workflows/build.yml`. CI verification runs on the Gitea runner through `.gitea/workflows/build.yml`.
GUI smoke verification runs on the Gitea runner through `.gitea/workflows/gui-smoke.yml`. It builds the app, starts `vite preview`, opens the UI in Chromium, and uploads a screenshot artifact.
## Project Structure ## Project Structure
```text ```text

View File

@@ -21,6 +21,7 @@ Codex Agent Repository Kit baseline applied. The project is a React/Vite/TypeScr
- Added standard npm `lint`, `audit`, and `release:check` scripts from the Node kit profile. - Added standard npm `lint`, `audit`, and `release:check` scripts from the Node kit profile.
- Processed Agent Kit update `c0262b9`, including the repository-owner derivation rule. - Processed Agent Kit update `c0262b9`, including the repository-owner derivation rule.
- Processed Agent Kit update `v1.0.6`, including safe fast-forward task starts, Gitea Ubuntu runner-only verification, follow-up issue guidance, and release artifact metadata exclusions. - Processed Agent Kit update `v1.0.6`, including safe fast-forward task starts, Gitea Ubuntu runner-only verification, follow-up issue guidance, and release artifact metadata exclusions.
- Added Gitea GUI smoke workflow that builds the app, runs `vite preview`, checks the rendered UI in Chromium, and uploads browser artifacts.
## Verification ## Verification