-
Notifications
You must be signed in to change notification settings - Fork 2
Add CI steps and bump node version #43
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
Changes from 15 commits
1741e91
7b58712
d23cbab
b30da21
86c36a5
3fb78f3
c265c0b
2466be5
795af9e
93c556a
321605e
1738742
0507829
781d3d2
924e78c
99cabdf
f6a734d
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,24 @@ | ||
| name: Setup Node | ||
| description: Setup Node with yarn and restore cached dependencies | ||
|
|
||
| inputs: | ||
| immutable-install: | ||
| description: Whether to run `yarn install --immutable` | ||
| required: false | ||
| default: 'false' | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Enable corepack | ||
| shell: bash | ||
| run: corepack enable | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | ||
| with: | ||
| node-version-file: '.nvmrc' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install ${{ inputs.immutable-install == 'true' && '--immutable' || '' }} | ||
|
Contributor
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.
Contributor
Author
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. That's surprising. Does yarn throw a status code of 1 when yarn install updates the lock file?
Contributor
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. yes |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| install: | ||
| name: Install dependencies | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - name: Setup node | ||
| uses: ./.github/actions/setup-node | ||
| with: | ||
| immutable-install: true | ||
|
|
||
| format: | ||
| name: Format | ||
| needs: install | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - name: Setup node | ||
| uses: ./.github/actions/setup-node | ||
|
|
||
| - name: Run format | ||
| run: yarn format --check | ||
|
|
||
| lint: | ||
| name: Lint | ||
| needs: install | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - name: Setup node | ||
| uses: ./.github/actions/setup-node | ||
|
|
||
| - name: Run lint | ||
| run: yarn lint | ||
|
|
||
| build: | ||
| name: Build | ||
| needs: install | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
||
| - name: Setup node | ||
| uses: ./.github/actions/setup-node | ||
|
|
||
| - name: Run build | ||
| run: yarn build |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v20.17.0 | ||
| v24.14.1 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,6 @@ | ||
| { | ||
| "plugins": ["eslint", "import", "oxc", "react", "typescript"] | ||
| "plugins": ["eslint", "import", "oxc", "react", "typescript"], | ||
| "categories": { | ||
| "correctness": "error" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1115,6 +1115,11 @@ __metadata: | |
| peerDependencies: | ||
| react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 | ||
| react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 | ||
| peerDependenciesMeta: | ||
|
Contributor
Author
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. I missed this change in a previous PR. CI correctly caught it. |
||
| react: | ||
| optional: true | ||
| react-dom: | ||
| optional: true | ||
| languageName: unknown | ||
| linkType: soft | ||
|
|
||
|
|
||
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.
I believe
node_modulescaching is built into this action. Can we leverage that instead of trying to handle the caching ourselves?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.
oh good find. I'll push & play around with it