Commit Graph

2 Commits

Author SHA1 Message Date
Gitea Actions
6fd690890b style: auto-format code via Prettier [skip ci] 2026-02-19 00:36:02 +05:00
441467eb8a feat: add lightweight version sync workflow (ADR-062)
All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 26m39s
Implements efficient version synchronization between production and test
environments without running the full test deployment pipeline.

Problem:
- Production version bumps triggered full 5-7 minute test deployment
- Wasteful: 95% less CPU, 99.8% less file I/O needed
- Code already tested when originally pushed to main

Solution (matching stock-alert architecture):
- New sync-test-version.yml workflow (~30 seconds)
- Triggers automatically after successful production deployment
- Updates only package.json in test directory
- Restarts PM2 with --update-env to refresh version metadata

Benefits:
- 90% faster (30 sec vs 5-7 min)
- Saves ~20 minutes/month of CI time
- Clean separation: no conditionals polluting deploy-to-test.yml
- Same end state, optimized path

Changes:
- Added .gitea/workflows/sync-test-version.yml (new workflow)
- Added docs/adr/0062-lightweight-version-sync-workflow.md (decision record)
- Updated docs/adr/index.md (ADR catalog)
- Cleaned up duplicate TSOA generation step in deploy-to-test.yml

Architecture:
- deploy-to-test.yml: unchanged (runs on code changes)
- deploy-to-prod.yml: unchanged (no explicit trigger needed)
- sync-test-version.yml: auto-triggers via workflow_run

Related:
- Inspired by stock-alert project optimization (commit 021f9c8)
- ADR-061: PM2 Process Isolation Safeguards

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-18 11:33:05 -08:00