-
Notifications
You must be signed in to change notification settings - Fork 29
ci: cleanup the test workflows #1073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
428be42
to
47156c0
Compare
47156c0
to
23d65c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Summary
This PR consolidates GitHub Actions workflows by removing the redundant `unit-tests.yaml` workflow and repurposing the existing `test-chains-config.yaml` workflow to handle broader test coverage. The changes are part of a test pipeline cleanup effort to reduce maintenance overhead while maintaining the same test functionality.The key modifications include:
- Removing
unit-tests.yaml
: This standalone workflow that ran unit tests on pull requests and pushes to main/develop branches has been completely deleted - Renaming and expanding
test-chains-config.yaml
: The workflow is now calledtest-unit-module.yaml
and has been modified to run tests from the repository root instead of just theaxelar-chains-config
subdirectory
The consolidated workflow now executes the root package.json
test script which runs both TypeScript unit tests and EVM tests using the command mocha -r ts-node/register "test/**/*.ts" "evm/test/**/*.js"
. This approach eliminates duplication since the root test script already includes testing for all modules, including the axelar-chains-config module that was previously tested separately.
The change fits well with the codebase's continuous integration practices by maintaining comprehensive test coverage while simplifying the workflow architecture. This consolidation reduces the number of workflow files that need to be maintained without sacrificing any testing capabilities.
Important Files Changed
Changed Files
Filename | Score | Overview |
---|---|---|
.github/workflows/unit-tests.yaml |
5/5 | Removed redundant standalone unit test workflow that duplicated functionality |
.github/workflows/test-unit-module.yaml |
4/5 | Renamed from test-chains-config.yaml and modified to run comprehensive tests from repository root |
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it consolidates existing functionality without removing test coverage
- Score reflects straightforward workflow consolidation with clear benefits and no complex logic changes
- Pay attention to the test-unit-module.yaml file to ensure the consolidated workflow covers all necessary test scenarios
Sequence Diagram
sequenceDiagram
participant User
participant GitHub
participant "GitHub Actions"
participant "Ubuntu Runner"
participant "Node.js"
participant "npm"
User->>GitHub: "Create/Update Pull Request"
GitHub->>GitHub Actions: "Trigger pull_request event"
GitHub Actions->>Ubuntu Runner: "Start blacksmith-2vcpu-ubuntu-2204 runner"
Ubuntu Runner->>GitHub: "Checkout code (actions/checkout@v4)"
Ubuntu Runner->>Node.js: "Install Node.js 18.x (useblacksmith/setup-node@v5)"
Node.js->>Ubuntu Runner: "Node.js installed with npm cache"
Ubuntu Runner->>npm: "Run npm ci"
npm->>Ubuntu Runner: "Dependencies installed"
Ubuntu Runner->>npm: "Run npm run build"
npm->>Ubuntu Runner: "Build completed"
Ubuntu Runner->>npm: "Run npm run test"
npm->>Ubuntu Runner: "Tests executed"
Ubuntu Runner->>GitHub Actions: "Job completed"
GitHub Actions->>GitHub: "Update PR status"
GitHub->>User: "Display test results"
2 files reviewed, no comments
Co-authored-by: Milap Sheth <[email protected]>
why?
how?
By removing redundant workflow and modifying other to cover the removed oneWe decided to keep the separate workflows for
axelar-contract-deployments
andaxelar-chains-config
packages.testing
Manual testing
Note
Streamlines CI by limiting unit tests to PRs and adding a path-based PR trigger for
axelar-chains-config
, with minor job/step tweaks.unit-tests.yaml
:on: pull_request
(remove path filters andpush
trigger).Run Unit Tests
; usenpm run test
.test-chains-config.yaml
:axelar-chains-config/**
.Written by Cursor Bugbot for commit 897bfc5. This will update automatically on new commits. Configure here.