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: 🎡 new Workflow for lint and type-check on PRs #388

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

IdrisGit
Copy link

Description

Added a new workflow file that runs whenever a PR is opened, synchronized, or reopened against the main branch.

This provides a CI check to make sure the linting is correct for the project.

Closes: #264

Added a new workflow file which runs whenever a PR is opened, synchronized or reopened against the
main branch

this provides a CI to make sure linting is correct in the project

✅ Closes: 264
Copy link

vercel bot commented Oct 19, 2024

@IdrisGit is attempting to deploy a commit to the Utkarsh Anand's projects Team on Vercel.

A member of the Team first needs to authorize it.

with:
node-version: "lts/*"
cache: "pnpm"
- name: Install dependencies
Copy link
Owner

Choose a reason for hiding this comment

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

Why do we need to install all dependencies again?

Copy link
Author

Choose a reason for hiding this comment

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

actions/setup-node have built in support for actions/cache, when we install dependencies in the first job i.e lint, it will cache the dependencies for the subsequent jobs, in the type-check it will fetch dependencies from cache instead of downloading them, or it will download if there is a cache miss.

@growupanand
Copy link
Owner

Can you please create a test PR in your branch to test this workflow before merging?

@IdrisGit IdrisGit force-pushed the 264-add-lint-type-check-on-new-pr branch from 2616286 to beef6df Compare October 23, 2024 16:16
@IdrisGit
Copy link
Author

Can you please create a test PR in your branch to test this workflow before merging?

The workflow had an issue, specifically with the ppm version 9 bugs. I have updated the PR, and it's working now. In fact, it is successfully detecting check errors in some files. You can check the action run here: PR Workflow Run.

I have also added concurrency in the workflow, which will prevent multiple action runs of the same PR if changes are pushed while one is in progress and will only run the latest push. This should help with organization and costs.

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.

Add Lint and Type check for Pull request
2 participants