Skip to content

Commit

Permalink
Shopifolk can use node v20.11.1 for development
Browse files Browse the repository at this point in the history
  • Loading branch information
jesstelford committed Mar 15, 2024
1 parent 9c24a46 commit 5a22920
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node with v18.12.0
uses: actions/setup-node@v3
- name: Setup Node from .nvmrc
uses: actions/setup-node@v4
with:
node-version: 18.12.0
node-version-file: '.nvmrc'

- name: Check for Changeset
run: npx @changesets/cli status --since="origin/main"
12 changes: 6 additions & 6 deletions .github/workflows/ci-a11y-vrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Setup Node with v18.12.0
uses: actions/setup-node@v3
- name: Setup Node from .nvmrc
uses: actions/setup-node@v4
with:
node-version: 18.12.0
node-version-file: '.nvmrc'
cache: yarn

- name: Restore cache
Expand Down Expand Up @@ -74,10 +74,10 @@ jobs:
with:
fetch-depth: 0 # Chromatic git history to track changes

- name: Setup Node with v18.12.0
uses: actions/setup-node@v3
- name: Setup Node from .nvmrc
uses: actions/setup-node@v4
with:
node-version: 18.12.0
node-version-file: '.nvmrc'
cache: yarn

- name: Restore cache
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/ci-lint.yml
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
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml → .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
pull_request:

jobs:
build:
name: 'Validate with Node v${{ matrix.node-version }}'
test:
name: 'Test with Node v${{ matrix.node-version }}'
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16.17.0', '18.12.0']
node-version: ['16.17.0', '18.12.0', '20.11.1']
steps:
- name: Checkout branch
uses: actions/checkout@v3
Expand Down Expand Up @@ -53,11 +53,5 @@ jobs:
- name: Build packages
run: yarn build

- name: Lint
run: yarn lint

- name: Type check
run: yarn type-check

- name: Test
run: yarn test
6 changes: 3 additions & 3 deletions .github/workflows/publish-polaris-for-vscode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/setup-node@v3
name: Use Node.js 16.x
- name: Setup Node from .nvmrc
uses: actions/setup-node@v4
with:
node-version: 16
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Setup Node.js
uses: actions/setup-node@v3
- name: Setup Node from .nvmrc
uses: actions/setup-node@v4
with:
node-version: 16.x
node-version-file: '.nvmrc'
cache: 'yarn'

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.12.0
v20.11.1
2 changes: 1 addition & 1 deletion dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: polaris
up:
- node:
yarn: v1.22.18
version: v18.12.0 # to be kept in sync with .nvmrc and .github/workflows/ci.yml
version: v20.11.1 # to be kept in sync with .nvmrc
- custom:
name: Build monorepo
met?: yarn build --output-logs=none
Expand Down
1 change: 0 additions & 1 deletion polaris-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"dev": "rollup -c -w",
"lint": "run-p lint:*",
"lint:js": "TIMING=1 eslint --cache .",
"lint:styles": "stylelint '**/*.{css,scss}'",
"test": "jest",
"clean": "rm -rf .turbo node_modules dist *.tsbuildinfo build"
},
Expand Down

0 comments on commit 5a22920

Please sign in to comment.