-
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
17 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 924e78c
run install before other jobs
peternandersson 99cabdf
missed shell
peternandersson f6a734d
make all installs immutable
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
Some comments aren't visible on the classic Files Changed page.
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,28 @@ | ||
| name: Setup Node.js | ||
| description: Setup Node.js with yarn and restore cached dependencies | ||
|
|
||
| inputs: | ||
| restore-cache: | ||
| description: "Whether to restore node_modules cache" | ||
| required: false | ||
| default: "true" | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Enable corepack | ||
| shell: bash | ||
| run: corepack enable | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version-file: ".nvmrc" | ||
| cache: "yarn" | ||
|
|
||
| - name: Restore node_modules | ||
| if: inputs.restore-cache == 'true' | ||
| uses: actions/cache/restore@v4 | ||
| with: | ||
| path: node_modules | ||
| key: node-modules-${{ hashFiles('yarn.lock') }} |
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,71 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| install: | ||
| name: Install dependencies | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup node | ||
| uses: ./.github/actions/setup-node | ||
| with: | ||
| restore-cache: false | ||
|
|
||
| - name: Yarn install | ||
| run: yarn install --immutable | ||
|
|
||
| - name: Cache node_modules | ||
| uses: actions/cache/save@v4 | ||
| with: | ||
| path: node_modules | ||
| key: node-modules-${{ hashFiles('yarn.lock') }} | ||
|
|
||
| format: | ||
| name: Format | ||
| needs: install | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup node | ||
| uses: ./.github/actions/setup-node | ||
|
|
||
| - name: Check formatting | ||
| run: yarn format | ||
|
|
||
| lint: | ||
| name: Lint | ||
| needs: install | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - 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@v4 | ||
|
|
||
| - 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
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 missed this change in a previous PR. CI correctly caught it.