-
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
Open
peternandersson
wants to merge
14
commits into
main
Choose a base branch
from
peter/add-ci
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1741e91
First passthrough
peternandersson 7b58712
missed checkout
peternandersson d23cbab
fan out checkout steps and make cache node_modules default true
peternandersson b30da21
corepack first for correct yarn version
peternandersson 86c36a5
Merge branch 'main' into peter/add-ci
peternandersson 3fb78f3
include previously missed yarn lock diff
peternandersson c265c0b
remove cache field
peternandersson 2466be5
clean up some names, pin actions to commits, and update versions
peternandersson 795af9e
bump node version
peternandersson 93c556a
example runtime breakage
peternandersson 321605e
fix lint setup & add a check flag to format
peternandersson 1738742
remove breakage
peternandersson 0507829
run format
peternandersson 781d3d2
move caching from actions/cache to actions/setup-node
peternandersson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: Setup Node | ||
| description: Setup Node with yarn and restore cached dependencies | ||
|
|
||
| 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' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| 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 | ||
|
|
||
| - name: Yarn install | ||
| run: yarn install --immutable | ||
|
|
||
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| v20.17.0 | ||
| v24.14.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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