Skip to content

fix(repo): Ensure build runs before lint in CI - #1902

Merged
brkalow merged 7 commits into
mainfrom
brk.fix/lint-ci
Oct 17, 2023
Merged

fix(repo): Ensure build runs before lint in CI#1902
brkalow merged 7 commits into
mainfrom
brk.fix/lint-ci

Conversation

@brkalow

@brkalow brkalow commented Oct 17, 2023

Copy link
Copy Markdown
Member

Description

Our lint step is type-aware, and our internal dependencies rely on packages being built for types to be correctly available. I've updated the lint step in CI to rely on build so that the types should be available as expected.

I've also shifted the turbo cache interaction into our shared setup action. We can opt-in to restoring the turbo cache by passing use-turbo-cache: 'true'.

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Packages affected

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore

@brkalow
brkalow requested a review from a team as a code owner October 17, 2023 15:44
@changeset-bot

changeset-bot Bot commented Oct 17, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5887755

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread turbo.json
},
"lint": {
"dependsOn": [],
"dependsOn": ["build"],

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Several lint rules depend on types being available for local packages, this ensures they are. Going forward, we might want to split linting into type-aware and not type-aware to optimize this (cc @nikosdouvlis).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Spot on Bryce. Expanding a little on the above, the general idea is that we want cheap jobs to run and possibly fail early, before other more expensive operations like package building, unit and integration tests etc.

@nikosdouvlis nikosdouvlis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very good job spotting this @brkalow

@brkalow
brkalow merged commit 7ac76dd into main Oct 17, 2023
@brkalow
brkalow deleted the brk.fix/lint-ci branch October 17, 2023 20:40
@clerk-cookie

Copy link
Copy Markdown
Collaborator

This PR has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@clerk clerk locked as resolved and limited conversation to collaborators Oct 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants