CI/CD Overview
This section documents the GitHub Actions pipelines, composite actions, and environments that ship the four public sites. The DApp and docs use prebuilt deployments for stability, while remote builds remain available if we need to switch back.
Websites and environments
| Environment | Site | URL | Pipeline |
|---|---|---|---|
| mainnet | DApp (production) | https://ritoswap.com | DApp Pipeline |
| testnet | DApp (testnet) | https://testnet.ritoswap.com | DApp Pipeline |
| docs | Docs site | https://docs.ritoswap.com | Docs and Storybook Pipeline |
| storybook | UI Storybook | https://ui.ritoswap.com | Docs and Storybook Pipeline |
Pipelines at a glance
Tests, predeploy validation, testnet deploy + smoke tests, rollback, mainnet deploy.
DApp PipelineDApp lint/test for Storybook, deploy Storybook, docs lint/test, deploy docs.
Docs and Storybook PipelineOne-click deploys and test suites for targeted runs.
Manual WorkflowsReusable building blocks used across workflows.
Composite ActionsEnvironment mapping, secrets, and vars.
Environments and VariablesMirror dispatch wrappers
The public mirror repo (https://github.com/ritovision/ritoswap-mirror ) exposes pipeline
badges and triggers private workflows in ritovision/ritoswap.
dispatch-dapp.yml->pipeline-dapp.ymldispatch-docs-storybook.yml->pipeline-docs-storybook.yml
These wrappers run on push and workflow_dispatch, using the ci-dispatch
environment and the RITOSWAP_PAT secret in the mirror repo.
Testing and quality gates
| Tool | What it covers | Where it runs |
|---|---|---|
| ESLint | DApp lint and docs lint | DApp pipeline, Docs pipeline, Manual ESLint |
| Vitest | DApp unit and integration tests | DApp pipeline (with Codecov), Docs pipeline (no Codecov), Manual unit tests |
| Hardhat | Smart contract compile + tests | DApp pipeline (contracts changes), Manual hardhat tests |
| Playwright (predeploy) | Local build smoke tests with test DB | DApp pipeline, Manual predeploy E2E |
| Playwright (post-deploy) | Live testnet smoke tests | DApp pipeline, Manual smoke E2E |
| Supertest | Live API smoke tests | DApp pipeline, Manual smoke API |
| Vitest (docs) | Docs workspace tests | Docs pipeline |
Coverage policy
- DApp pipeline uploads coverage to Codecov on unit tests.
- Storybook lint/test uses unit tests without Codecov.
- Manual unit tests run without Codecov.
- Coverage reports are still uploaded as GitHub artifacts for each unit-test run.
Rollback policy
Testnet uses post-deploy smoke tests and rolls back when they fail. This is treated as a close approximation of mainnet behavior. Mainnet does not run smoke tests today because it targets the live chain and this is not a commercial product with revenue at stake. The same rollback flow can be added to mainnet if desired.