CTDC-1885: Add Testing and Dependency Updates#37
Conversation
Introduces a test workflow that runs on pushes, pull requests, and manual triggers. The workflow sets up Node.js, installs dependencies, runs tests, and uploads coverage reports to Coveralls.
Introduced new npm scripts for running tests, CI, and coverage. Updated the Jest devDependency from version 28.1.3 to 30.2.0.
Replaced the 'mysql' package with 'mysql2' in dcfConnector.js for improved compatibility. Updated several dependencies and devDependencies in package.json and package-lock.json, including major upgrades to AWS SDK packages, express-mysql-session, morgan, newrelic, and jest, to address security, compatibility, and feature enhancements.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR introduces automated testing infrastructure and updates dependencies for improved compatibility and performance. The primary focus is establishing a CI/CD pipeline with test coverage reporting while modernizing the project's dependency stack.
Key Changes:
- Migrated from
mysqltomysql2driver across database connection files - Added GitHub Actions workflow for automated testing with coverage reporting
- Updated multiple dependencies including jest, newrelic, and express-mysql-session to current stable versions
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/test.yml | Introduces GitHub Actions workflow for automated testing and coverage reporting |
| package.json | Updates project metadata, adds test scripts, and upgrades dependencies to latest stable versions |
| services/mysql-connection.js | Migrates to mysql2 driver and fixes incomplete conditional check |
| connectors/dcfConnector.js | Updates mysql import to mysql2 for consistency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds the DCF_FILE_URL environment variable to the test job in the GitHub Actions workflow to ensure tests have access to the required URL.
Introduces a .env.test file for test-specific environment variables. Updates config.js to load .env.test when NODE_ENV is 'test'. Modifies test scripts in package.json to set NODE_ENV to 'test'. Removes .env.test from .gitignore to allow versioning.
Included a Coveralls coverage badge at the top of the README to display test coverage status for the repository.
Deleted the .env.test file and updated .gitignore to exclude it from version control, ensuring environment-specific configuration is not tracked.
This pull request sets up the testing environment and introduces several important updates:
CTDC-1885