Conversation
Copy a build workflow from Main branch that builds a Docker image, scans it for vulnerabilities with Trivy, tags the image, pushes it to Amazon ECR, and sends a Slack notification. The workflow supports environment selection and configurable failure on vulnerability scan.
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.
Upgraded multiple @aws-sdk packages and related dependencies to version 3.954.0 and updated peer dependencies accordingly. Also removed @ampproject/remapping and added new AWS SDK modules to improve compatibility and maintain support for the latest Node.js versions.
Renamed the project to 'crdc-ctdc-files' and updated the version to 1.1.0. Added new test scripts for Jest, including CI and coverage options.
|
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 ✨ Finishing touches🧪 Generate unit tests (beta)
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 establishes automated CI/CD infrastructure for the file service, transitioning from "bento-files" to "crdc-ctdc-files" with version 1.1.0. The changes introduce comprehensive testing and build automation workflows.
Key changes:
- Updated project metadata (name and version) and added Jest-based test scripts
- Created GitHub Actions workflow for automated testing with coverage reporting
- Created GitHub Actions workflow for Docker image building with security scanning and ECR deployment
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Updated project name/version and added Jest test scripts for local and CI environments |
| .github/workflows/test.yml | Added automated testing workflow with Node.js setup and Coveralls integration |
| .github/workflows/build.yml | Added Docker build workflow with Trivy scanning, ECR deployment, and Slack notifications |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: | | ||
| # Get all tags for the repo and find the latest tag for the branch being built | ||
| git fetch --tags --force --quiet | ||
| tag=$(git tag -l $BRANCH_NAME* | tail -1) |
There was a problem hiding this comment.
The variable $BRANCH_NAME is not quoted, which will cause word splitting and glob expansion if the branch name contains spaces or special characters. Wrap the variable in double quotes: \"$BRANCH_NAME*\"
| tag=$(git tag -l $BRANCH_NAME* | tail -1) | |
| tag=$(git tag -l "$BRANCH_NAME"* | tail -1) |
| # Get all tags for the repo and find the latest tag for the branch being built | ||
| git fetch --tags --force --quiet | ||
| tag=$(git tag -l $BRANCH_NAME* | tail -1) | ||
| if [ ! -z "$tag" ]; |
There was a problem hiding this comment.
Using -z to check for empty strings should be used without negation for clarity. Instead of [ ! -z \"$tag\" ], use [ -n \"$tag\" ] to check if the variable is non-empty.
| if [ ! -z "$tag" ]; | |
| if [ -n "$tag" ]; |
This pull request introduces automated CI/CD workflows for building and Testing. The main changes include adding GitHub Actions workflows for building Docker images and running tests, updating the project name and version, and enhancing the test scripts using Jest