-
Notifications
You must be signed in to change notification settings - Fork 1
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
Workflow cicd pipeline #12
Conversation
This PR adds a full CI/CD pipeline for the project, which includes the following: - **Node.js and npm setup**: Installs Node.js and dependencies. - **Test workflow**: Runs tests whenever code is pushed to 'main' or on pull requests. - **Deployment workflow**: Deploys the project to xyz after tests are successful. The workflow file is located in `.github/workflows/ci-cd-pipeline.yml`.
@Hermann27 the actions look good, but @ozzydogandev has now merged in his changes for the homepage, so now the example test config is broken. You will need to update this branch with the latest, then fix the issue. The error is that jest does not know how to handle .css files. Please see the following section of the docs: https://jestjs.io/docs/webpack#handling-static-assets You may even want to fix that in a separate pull request, then update this PR after that one has been merged. Or you can fix it in this one. |
To update your PR branch, you have 2 choices, you can rebase or merge locally, then push to the remote branch, or you can update the branch remotely. Updating remotely is fairly simple when there are no merge conflicts, you can simply click the 'Update branch' button in the PR. Then do a hard reset on your local branch to the remote branch: After clicking 'Update branch': git checkout pr-mybranch
git fetch
git reset --hard origin/pr-mybranch |
- Fixed outdated branch by merging `main` into the feature branch to sync with the latest changes. - Resolved Jest configuration issues to properly handle CSS and style imports in tests. - Configured ESLint to automatically fix default formatting issues such as indentation, semicolons, and spacing, ensuring consistent code style across the project.
PR updated 👍 |
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.
Overall, looks great! Added a couple of comments. Good job on getting Jest working with CSS files.
package.json
Outdated
"lint": "eslint . --report-unused-disable-directives --max-warnings 0", | ||
"lint": "eslint . --fix --report-unused-disable-directives --max-warnings 0", |
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.
I'm not sure you actually want to use --fix
here. You would like lint
to report an errors. You could create a separate script for fixing named lint:fix
.
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.
I have added a separate script for fixing the lint.
jest.config.mjs
Outdated
/* transform: { | ||
"^.+\\.jsx?$": "babel-jest", | ||
}, | ||
moduleNameMapper: { | ||
moduleNameMapper: { | ||
"^@/(.*)$": "<rootDir>/src/$1", | ||
}, | ||
},*/ |
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.
Could you go ahead and remove the commented out lines.
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.
I have removed the comment as requested.
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.
Sorry, meant to get back to this. Looks good to me, but you are going to need to merge in the latest changes from main as Ozzy has been pushing some changes.
for now, I have turned off these rules:
What would be the best way to correct those errors? |
This PR adds a full CI/CD pipeline for the project, which includes the following: