Skip to content
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

feat:setup project workflow and template #27

Merged
merged 4 commits into from
Oct 22, 2024
Merged

Conversation

NkwaTambe
Copy link
Contributor

This PR sets up a Continuous Integration (CI) workflow for the project using GitHub Actions. The workflow is triggered on both push and pull_request events for the main branch. It includes the following steps to automate code quality checks and tests:

Install Dependencies:

The workflow installs project dependencies using npm ci, ensuring a clean and fast installation based on the package-lock.json file.
Node Modules Caching:

The node_modules folder is cached using the SHA of the current commit. This speeds up subsequent jobs by avoiding redundant dependency installations across linting, formatting, TypeScript checks, and unit tests.
Linting (ESLint):

Ensures code quality by running npm run lint:check. Any linting issues in the code will be flagged during this step.
Formatting (Prettier):

Verifies that the code adheres to the project's formatting guidelines using npm run prettier:check. Any formatting discrepancies will be reported.
TypeScript Checks:

Runs TypeScript checks (npm run ts:check) to catch type errors in the project, ensuring type safety.
Unit Tests:

Executes unit tests using npm run test:unit to validate the functionality of the project and make sure the code behaves as expected.
Benefits:
Improved CI Pipeline Performance: With caching of node_modules, the workflow is faster and more efficient, reducing build times by reusing cached dependencies when possible.
Automated Quality Assurance: Linting, formatting, type checking, and testing are automated to maintain high code quality and reliability.
Consistency Across Jobs: The setup ensures that all jobs (linting, formatting, type checking, and testing) run on the same set of dependencies, minimizing the risk of discrepancies.**

@NkwaTambe NkwaTambe self-assigned this Oct 22, 2024
Copy link
Collaborator

@Arielpetit Arielpetit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, great job

Copy link
Collaborator

@Koufan-De-King Koufan-De-King left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @NkwaTambe,
I like the auto-prettier-formatting a lot.
Please don't forget to make the workflow to equally build the project.

@NkwaTambe NkwaTambe merged commit d258c46 into main Oct 22, 2024
5 checks passed
@NkwaTambe NkwaTambe deleted the feat/gitflow-setup branch October 22, 2024 14:50
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