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

CI (Continuous Integration) pipeline added #79

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

akshat99812
Copy link

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

This pull request introduces a CI (Continuous Integration) pipeline to our project. The CI pipeline automates the process of testing and building our codebase, ensuring that code changes are validated and merged seamlessly. This enhancement addresses issue #3 and aims to improve our development workflow by catching potential issues early.

Fixes #3

Snapshots/Videos:
Screenshot 2024-06-18 at 3 49 17 PM

Type of change

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • [*] 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert
  • ✏️ Updated Test Cases

Added tests?

  • 👍 Yes
  • 🙅 No, because they aren't needed
  • 🙋 No, because I need help

Internationalization Support?

  • 👍 Yes, Added text tokens
  • 🙅 No, because they aren't needed
  • 🙋 No, because I need help

Steps to test the feature:

Snapshot of the test-cases that are passing:

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

@Neha Neha requested review from Neha, singhlify and ekas June 18, 2024 11:06
@Neha Neha added this to the JSLovers ver1.0 milestone Jun 18, 2024
Copy link
Contributor

@Neha Neha left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution.

There are a few comments I left. Please review.

One request: do not open new PR. Please keep pushing changes in the same PR

- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Use Node.js
Copy link
Contributor

Choose a reason for hiding this comment

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

make smallercase N in nodejs

@@ -34,3 +34,14 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts

# Ignore all files in the app directory
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we are adding these here?

/app/*
/components/*

# Except the about/page.tsx file
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we are adding these here?

Copy link
Author

Choose a reason for hiding this comment

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

When I commit the file the prettier and eslinter fixes each and every file and because I did't wanted to commit .

Copy link
Contributor

Choose a reason for hiding this comment

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

These files are the files on which check should happen. Once Linter, and format will execute yes they will show errors and requires fixes across project. This is wrong to put the files in gitignore.

"autoprefixer": "^10",
"eslint": "^8",
"eslint-config-next": "14.0.0",
"eslint": "^8.57.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

These should be dev-dependencies?

Copy link
Author

Choose a reason for hiding this comment

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

I think so

.eslintrc.cjs Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the extension is 'cjs'

Copy link
Author

Choose a reason for hiding this comment

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

ESLint configuration files often use CommonJS syntax, by using .cjs , you explicitly tell node.js and eslint that this configuration file uses commonJS syntax, avoiding potential conflicts or errors.

Copy link
Contributor

Choose a reason for hiding this comment

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

have you tried only .eslintrc ?

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all branches and tags
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to all branches? Also, we don't have any tags

Copy link
Author

Choose a reason for hiding this comment

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

should I add this
fetch-depth: 1 # Fetch only the latest commit

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't need it. Please check

- name: Install dependencies
run: npm install

- name: Run lint
Copy link
Contributor

Choose a reason for hiding this comment

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

which lint we are running. Can we please add the name

Copy link
Author

Choose a reason for hiding this comment

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

Should i rename it to

  • name: Run ESLint

- name: Run lint
run: npm run lint

- name: Run format check
Copy link
Contributor

Choose a reason for hiding this comment

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

which format we are running. Can we please add the name

Copy link
Author

Choose a reason for hiding this comment

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

 Run Prettier to check code formatting
  - name: Run Prettier check

Copy link
Contributor

Choose a reason for hiding this comment

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

these changes should not be here

Copy link
Author

Choose a reason for hiding this comment

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

They were done by the prettier formatter , shuld I drop them in the next commit?

Copy link
Contributor

Choose a reason for hiding this comment

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

Have you run the PR at your local? These changes should be for across the project

types/png.d.ts Outdated
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this file is here?

Copy link
Author

Choose a reason for hiding this comment

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

declaring modules for file types like *.png, *.svg, *.jpeg, and *.jpg in a TypeScript its was a eslinter error

Copy link
Contributor

Choose a reason for hiding this comment

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

it should not be here

@singhlify singhlify removed their request for review June 19, 2024 07:28
@akshat99812
Copy link
Author

@Neha
Screenshot 2024-06-19 at 1 30 07 PM
there are some linter errors that were fixed in abut/page.tsx and jobs/page.tsx

@Neha
Copy link
Contributor

Neha commented Jun 19, 2024

@Neha Screenshot 2024-06-19 at 1 30 07 PM there are some linter errors that were fixed in abut/page.tsx and jobs/page.tsx

The whole purpose of having Eslint, and Prettier in CI is to get such errors and fix them. Putting the files in gitignore to ignore these errors will not serve any purpose.

Choose a reason for hiding this comment

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

Suggestion: I would generally suggest using the new stable versions of actions and always use pinned GHA (here's why -- tl;dr; for better security and to prevent us from SLSA attacks)

.github/workflows/ci.yml Outdated Show resolved Hide resolved
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Use Node.js
uses: actions/setup-node@v2

Choose a reason for hiding this comment

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

Same goes for this:

Suggested change
uses: actions/setup-node@v2
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 #v4.0.2

@@ -148,4 +148,4 @@ export default async function page() {
</section>
</>
);
}
}

Choose a reason for hiding this comment

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

Suggestion (non-blocking): Not sure, why our formatter removes the newline at the end, usually it's a good practice to have newline at the end.

Copy link
Contributor

Choose a reason for hiding this comment

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

My guess is formatter is not installed properly.

Co-authored-by: Siddhant Khare <[email protected]>
@Neha
Copy link
Contributor

Neha commented Jun 30, 2024

Hey @akshat99812 would you be able to work on the code comments?

@akshat99812
Copy link
Author

@Neha Sure, I'd be happy to help! Could you please clarify what specific tasks you want me to work on regarding the code comments? For example, are you looking for me to add comments to existing code, review and improve current comments, or something else?

@Neha
Copy link
Contributor

Neha commented Jun 30, 2024

@Neha Sure, I'd be happy to help! Could you please clarify what specific tasks you want me to work on regarding the code comments? For example, are you looking for me to add comments to existing code, review and improve current comments, or something else?

I didn't got your question.
Anyhow, this is how the OS works - There are comments added for your PR. Please go through the comments and fix your PR accordingly.

@Siddhant-K-code
Copy link

Could you please clarify what specific tasks you want me to work on regarding the code comments? For example, are you looking for me to add comments to existing code, review and improve current comments, or something else?

Hey @akshat99812, we are just suggesting to address the PR review comments that Neha & I left above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Chore -> Add CI Pipeline -> Github Actions
3 participants