Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: optimize Cypress recordings with conditional triggers (#3043)
Implements DHIS2-17374 Conditional Recording Triggers: Implemented conditional recording triggers via commit messages and GitHub labels to ensure that Cypress tests are only recorded when necessary. Parallel Execution Strategies: Refined parallel execution strategies to improve efficiency and resolve test redundancies in GitHub Actions. Debugging Enhancements: Added detailed debugging outputs to help track the dynamic values of the test environment variables and ensure correct parameter passing in the workflow. Manual Grouping of Tests: In GitHub Actions, without specified test groups, all tests would run in every parallel container, leading to unnecessary repetition. By organizing tests into predefined groups, each group runs only once. This prevents redundancy and expedites the testing process. Why Not Rely on Cypress's Automatic Balancing? While Cypress automatically assigns tests to machines to balance workload (more on Cypress load balancing), GitHub Actions requires explicit distribution of tasks. This manual grouping ensures efficient resource usage and prevents multiple executions of the same tests across different runners. Benefits: This approach allows precise control over test distribution, enhancing predictability and efficiency. It reduces total execution time and operational costs by ensuring each test is run precisely once across the available infrastructure. This method optimises our use of GitHub Actions, ensuring a faster, cost-effective, and efficient testing process. Update Documentation: Updated the documentation to reflect the changes and ensure clarity on the new CI/CD processes. Expected Outcomes: Reduced Cypress Cloud Credit Usage: By optimising the conditions under which tests are recorded and uploaded to Cypress Cloud, we anticipate a significant reduction in credit usage. Increased CI Efficiency: With better management of parallel execution and conditional testing, the CI process should be more efficient, leading to quicker test cycles.
- Loading branch information