Branch Testing
Every push to a pull request branch triggers a test workflow.Automatic PR Labeling
PRs are automatically labeled according to the folders that were changed:backend- Backend code changesfrontend- Frontend code changesintegration-testing-api- API integration test changes
Test Suite
For each PR, the following actions are run:- Lint - Code style and quality checks
- Unit Test - Component-level tests
- Integration Test - Cross-component tests
Deployments
Sandbox Deployment (Automatic)
Upon selecting merge for a PR, it will be added to a merge queue. The merge queue automatically merges the PR into the main branch. Once merged, the following actions are triggered based on PR labels:| Label | Action |
|---|---|
frontend | Deploy app-capital-service to sandbox |
frontend | Deploy storybook to sandbox |
backend | Deploy api-capital-service to sandbox |
Staging/Production Deployment (Manual)
For deploys to staging and production:- User cuts a release branch
- User goes to GitHub Actions UI
- Click
Deploy Application Staging/Production(application-deployment.yml) - Select the branch to deploy and the environment
Production deployments require approval from a user at each step.
Hotfix Deployment
Use the hotfix workflow when you need to deploy an urgent fix to staging or production without going through the normal release cycle.When to use a hotfix
- Critical bug fix needed in production
- Urgent feature fix requested by stakeholders
Hotfix process
- Create a PR with your fix and merge it to
master - Go to GitHub Actions > Hotfix workflow
- Click Run workflow
- Select the target release branch (e.g.,
v2025.51.2) - Enter the squashed commit SHA to cherry-pick
- Run the workflow
- Once the workflow completes, approve and merge the hotfix PR it creates
- Deploy the updated release branch to staging/production using the normal deployment workflow
To find the current release version, navigate to the staging or production environment and visit
/api/version in your browser.Workflow Files
Key workflow files are located in.github/workflows/:
| File | Purpose |
|---|---|
ci.yml | PR testing workflow |
application-deployment.yml | Staging/production deployments |
Best Practices
Before Creating a PR
- Run lint locally:
just lint - Run unit tests:
just test - Ensure your branch is up to date with main
Handling CI Failures
- Check the GitHub Actions tab for error details
- Fix any lint or test failures locally
- Push the fixes to your branch
- CI will automatically re-run
Deployment Checklist
For staging/production deployments:- All tests passing on the release branch
- Release notes prepared
- Stakeholders notified
- Rollback plan documented (if applicable)