How to: CI Workflow
The [🚀 CI](.github/workflows/ci.yml) job verifies the Insight demo with
linting, type checks, unit tests and a Docker build. Open **Actions → 🚀 CI —
Insight Demo**, select the branch or tag to test in the drop‑down and click
**Run workflow** to dispatch the pipeline. This
workflow has no automatic triggers; only the repository owner can launch it
manually from the GitHub UI. Each job begins by verifying the actor matches the
repository owner, so non‑owners exit immediately before running the heavy
steps. When the owner launches the workflow every job runs.
Because the first job checks `${{ github.actor }}` against `${{ github.repository_owner }}`,
you must own the repository to run the workflow successfully.
Jobs following the main test stage include `if: always()` so the Windows and
macOS smoke tests, documentation build and Docker jobs execute even when the
lint or unit tests fail. This behavior helps confirm that cross‑platform builds
and docs generation succeed while debugging failures.
Dependency hashes are fully locked, including `setuptools`, so `pip install -r
requirements.lock` succeeds across Python versions. The Windows smoke job now
builds the Insight browser before running tests, ensuring the service worker is
present for the cache version check. Browser assets are cached across jobs using
a deterministic hash derived from the expected checksums, so later stages reuse
the same files. The docs and Docker jobs automatically fetch any missing assets
and open a pull request when checksums drift. See
[CI_WORKFLOW.md](docs/CI_WORKFLOW.md) for a detailed job overview.
All Node.js steps pin the same lockfiles via `cache-dependency-path` so
`actions/setup-node` caches npm packages correctly and avoids "Dependencies lock
file is not found" warnings. The paths are:
```
alpha_factory_v1/demos/alpha_agi_insight_v1/insight_browser_v1/package-lock.json
alpha_factory_v1/core/interface/web_client/package-lock.json
alpha_factory_v1/core/interface/web_client/staking/package-lock.json
alpha_factory_v1/demos/alpha_agi_insight_v1/src/interface/web_client/package-lock.json
```
To publish a release, create a Git tag and run the same workflow on that
tag. The Docker job pushes the `agi-insight-demo` image to GitHub Container
Registry while the deploy stage attaches the built web client archive to a
GitHub release. If any later step fails the workflow automatically restores
the previous `latest` tag to avoid shipping a broken image.