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

Create GitHub action to check pull requests #654

Merged
merged 11 commits into from
Nov 30, 2023

Conversation

sonngdev
Copy link
Contributor

@sonngdev sonngdev commented Nov 28, 2023

✨ Codu Pull Request 💻

Codu Logo

Pull Request details:

  • Related issue: Adding to precommit hooks #649
  • Add a new GitHub action to run on each Pull request. It will:
    • Run ESLint: npm run lint
    • Run Prettier: npm run prettier (this command is a breaking change, see below)
    • Run Jest tests: npm run test:jest

Any Breaking changes:

  • Previously, running npm run prettier will also fix the styling errors detected by Prettier. This command now only checks for errors. To fix them automatically as before, use npm run prettier:fix.

Associated Screenshots:

Each Pull request will have an action like this moving forward.

New action running in each new PR

Click on Details to see how each step runs.

The Detail page of the new action

Copy link

vercel bot commented Nov 28, 2023

@thanhsonng is attempting to deploy a commit to the Codú Team on Vercel.

A member of the Team first needs to authorize it.

@sonngdev
Copy link
Contributor Author

sonngdev commented Nov 28, 2023

Pending items

Some pending items need further discussion and should be handled after this PR:

Lint warnings

Currently there are a lot of ESLint warnings. Some easy ones that can be quickly fixed are @typescript-eslint/consistent-type-imports and @typescript-eslint/no-unused-vars rules. I suggest we make these into error instead, otherwise they could easily be missed in future PRs (warnings don't make the lint command fail).

TypeScript checks

Similarly, there are lots of TS errors, and they make the check fail (that's why I don't include a TS check in this PR). Type fixes can be complex and therefore should have its own PR and discussion.

Playwright tests

Honestly I don't know enough about Playwright and Prisma to include it in this GH Action at the moment.

@NiallJoeMaher
Copy link
Contributor

@thanhsonng this is amazing! I have a PR open with Playwright so between us this should catch most things.

Copy link

vercel bot commented Nov 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
codu ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 30, 2023 0:20am

Copy link
Contributor

@NiallJoeMaher NiallJoeMaher left a comment

Choose a reason for hiding this comment

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

🌮 Fantastic addition!

@NiallJoeMaher NiallJoeMaher merged commit 52cd6eb into codu-code:develop Nov 30, 2023
4 checks passed
@sonngdev
Copy link
Contributor Author

@NiallJoeMaher Thanks for merging, it's a pleasure to contribute as always 🚀

@sonngdev sonngdev deleted the chore/pr-actions branch November 30, 2023 12: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.

2 participants