-
-
Notifications
You must be signed in to change notification settings - Fork 32
Add GitHub actions for linting/building of registry #91
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
base: main
Are you sure you want to change the base?
Changes from all commits
c68d1c3
b240d94
9450da8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| lint-and-build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "20" | ||
| cache: "npm" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run lint-staged | ||
| run: npx lint-staged | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This command should be broken into two different jobs |
||
|
|
||
| - name: Run Astro check | ||
| run: npx astro check | ||
| env: | ||
| GITHUB_REPO_URL: https://github.com/WebDevSimplified/wds-shadcn-registry | ||
| DEPLOY_PRIME_URL: https://localhost:4321 | ||
| URL: https://wds-shadcn-registry.netlify.app | ||
|
|
||
| - name: Build registry | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't actually ensure the registry that is committed is the same as the one built by this command. We probably need to add a diff step to ensure the code in the registry folder doesn't change after running this since if it does change it means the registry is not being built before pushing. |
||
| run: npm run registry:build | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we break each linting and formatting task into its own job? This will ensure they all run in parallel and each will throw their own errors which means if the linting and formatting is broken we will get two errors instead of only one of them running and throwing an error.