-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Shopifolk can use node v20.11.1 for development #11739
Changes from all commits
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,57 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- next | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
name: 'Lint & type check' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout branch | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Free up space on GitHub image | ||
run: | | ||
# Based on the official advice: | ||
# https://github.com/actions/virtual-environments/issues/2840#issuecomment-790492173 | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
|
||
- name: Setup Node from .nvmrc | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: yarn | ||
|
||
- name: Restore cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
**/.eslintcache | ||
**/.turbo | ||
node_modules/.cache/turbo | ||
polaris.shopify.com/.next/cache | ||
key: ${{ runner.os }}-lint-v3-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-lint-v3- | ||
|
||
- name: Install dependencies | ||
run: yarn --frozen-lockfile | ||
|
||
- name: Build packages | ||
run: yarn build | ||
|
||
- name: Lint | ||
run: yarn lint | ||
|
||
- name: Type check | ||
run: yarn type-check |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v18.12.0 | ||
v20.11.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,6 @@ | |
"dev": "rollup -c -w", | ||
"lint": "run-p lint:*", | ||
"lint:js": "TIMING=1 eslint --cache .", | ||
"lint:styles": "stylelint '**/*.{css,scss}'", | ||
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 was failing with the error:
Which makes sense because there's no But why was it working before? Because the previous CI task would (unnecessarily) run |
||
"test": "jest", | ||
"clean": "rm -rf .turbo node_modules dist *.tsbuildinfo 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.
Decoupling the running of our lint tools (which can be run in any node version) from the running of our tests (which should only be run against the versions of node we support in
package.json#engines
). See https://github.com/Shopify/polaris-internal/issues/1522 for the differences.