Skip to content

CTDC-1885: Add Testing and Dependency Updates#37

Merged
adamdaventryGov merged 8 commits intodevelopfrom
testing_setup
Dec 29, 2025
Merged

CTDC-1885: Add Testing and Dependency Updates#37
adamdaventryGov merged 8 commits intodevelopfrom
testing_setup

Conversation

@Nahomtes
Copy link

@Nahomtes Nahomtes commented Dec 23, 2025

This pull request sets up the testing environment and introduces several important updates:

  • Added a GitHub Actions workflow for automated testing
  • Enabled test coverage reporting as part of the CI pipeline
  • Improved overall compatibility with newer packages and tooling
  • Updated multiple project dependencies to their latest stable versions
  • Migrated the database driver from mysql to mysql2 for improved performance and compatibility

CTDC-1885

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.
@coderabbitai
Copy link

coderabbitai bot commented Dec 23, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Nahomtes Nahomtes requested a review from Copilot December 23, 2025 23:54
Copy link

Copilot AI left a 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 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 mysql to mysql2 driver 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.
@Nahomtes Nahomtes requested a review from jonkiky December 24, 2025 18:05
@Nahomtes Nahomtes changed the title Add Testing and Dependency Updates CTDC-1885: Add Testing and Dependency Updates Dec 29, 2025
Deleted the .env.test file and updated .gitignore to exclude it from version control, ensuring environment-specific configuration is not tracked.
@adamdaventryGov adamdaventryGov merged commit 4421684 into develop Dec 29, 2025
2 of 3 checks passed
@Nahomtes Nahomtes deleted the testing_setup branch March 2, 2026 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants