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

Add vitest #123

Merged
merged 11 commits into from
Dec 10, 2024
Merged

Add vitest #123

merged 11 commits into from
Dec 10, 2024

Conversation

jawj
Copy link
Collaborator

@jawj jawj commented Nov 26, 2024

Add vitest example test and add GitHub action to run it.

Relatedly, add .prettierrc and a GitHub Action to check TypeScript types.

@jawj jawj requested a review from pffigueiredo November 26, 2024 13:45
@jawj
Copy link
Collaborator Author

jawj commented Nov 26, 2024

I've added GitHub Actions for a dummy test and also a TypeScript type check.

We currently have 3 separate workflows (.yml files) that are mostly the same. We could alternatively have these be three jobs within the same workflow, or even three bun run ... commands within the same job (which would save a bunch of duplicated bun installs). But my feeling from other repos is that we prefer to do one thing per workflow?

@jawj jawj marked this pull request as ready for review November 26, 2024 13:48
@jawj jawj enabled auto-merge (squash) November 26, 2024 13:49
@pffigueiredo
Copy link
Contributor

pffigueiredo commented Nov 27, 2024

I think a lot of the common setup like install deps should be a single action that we import, something like this: https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/actions/prepare/action.yml

Let's forget about this for now 👍

@@ -0,0 +1,16 @@
name: Check TypeScript types
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 should do both type and format checking in the same workflow, they are usually very coupled with each other - maybe call it lint

.github/workflows/run-tests.yml Outdated Show resolved Hide resolved
.github/workflows/run-tests.yml Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
@bayandin bayandin self-requested a review November 29, 2024 09:40
Copy link
Contributor

Choose a reason for hiding this comment

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

What do we do to actually update the lockfile since we use bun install? I don't expect it to update the package-lock.json I think, AFAIK it only reads it to seed the resolution tree but then keeps using its own binary lockfile thing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, after looking at https://bun.sh/docs/cli/install#production-mode it seems --frozen-lockfile isn't going to do anything for us since we don't include a Bun lockfile (bun.lockb) in the repo?

Copy link
Contributor

@pffigueiredo pffigueiredo left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@jawj jawj merged commit da779b2 into main Dec 10, 2024
5 checks passed
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