-
Notifications
You must be signed in to change notification settings - Fork 3
Add GitHub Actions workflow to run tests on pull requests #86
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
Co-authored-by: goransle <[email protected]>
|
@copilot also make it run on the 'develop' branch |
Co-authored-by: goransle <[email protected]>
|
@copilot also add a check that tsc has been run correcly: there should be no diffing files after running |
Co-authored-by: goransle <[email protected]>
Added a check to verify TypeScript compilation is up to date. The workflow now runs |
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.
Pull Request Overview
This PR adds a GitHub Actions workflow for automated testing on pull requests targeting master and develop branches. The workflow ensures code quality by running the complete test suite and verifying TypeScript compilation is up to date.
- Adds automated CI/CD pipeline with Node.js 20 and dependency caching
- Implements TypeScript compilation verification to ensure generated files are committed
- Creates required test configuration and runs the full test suite (121 tests)
| if [ -n "$(git status --porcelain)" ]; then | ||
| echo "Error: Files have changed after running 'npm run tsc'. Please run 'npm run tsc' locally and commit the changes." | ||
| git status | ||
| git diff | ||
| exit 1 | ||
| fi |
Copilot
AI
Oct 10, 2025
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.
[nitpick] The shell script logic is embedded in the YAML workflow. Consider extracting this into a separate script file for better readability and maintainability.
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.
@copilot please fix
goransle
left a comment
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.
LGTM
This PR adds a GitHub Actions workflow that automatically runs the test suite on all pull requests targeting the
masteranddevelopbranches.What's Changed
Added
.github/workflows/test.ymlwhich:masteranddevelopbranchesnpm run tscand fails if any files are modified, ensuring developers commit generated JavaScript filesconfig.jsonfile for testsnpm test, including:Why This Change?
Currently, the project relies on manual testing or external CI systems. This workflow provides automated quality checks directly in GitHub, making it easier to catch issues early in the development process and ensuring all PRs meet the project's quality standards before merging.
The TypeScript compilation check ensures that all generated JavaScript files from TypeScript sources are kept in sync and committed, preventing issues where TypeScript changes are made but the compiled output is not updated in the repository.
Testing
The workflow configuration has been validated for:
checkout@v4,setup-node@v4)The workflow will be automatically tested when this PR is merged and subsequent PRs are opened.
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.