diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 3493dbfeb97..04bd6f90e93 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -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" diff --git a/.github/workflows/ci-a11y-vrt.yml b/.github/workflows/ci-a11y-vrt.yml index 62e056b6dcf..e7ef5415f45 100644 --- a/.github/workflows/ci-a11y-vrt.yml +++ b/.github/workflows/ci-a11y-vrt.yml @@ -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 @@ -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 diff --git a/.github/workflows/ci-lint.yml b/.github/workflows/ci-lint.yml new file mode 100644 index 00000000000..809e4a5e4e0 --- /dev/null +++ b/.github/workflows/ci-lint.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci-test.yml similarity index 86% rename from .github/workflows/ci.yml rename to .github/workflows/ci-test.yml index 71b2576ca63..249f58f3b9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci-test.yml @@ -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 @@ -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 diff --git a/.github/workflows/publish-polaris-for-vscode.yml b/.github/workflows/publish-polaris-for-vscode.yml index 9496a1c27f0..8567e9cb06a 100644 --- a/.github/workflows/publish-polaris-for-vscode.yml +++ b/.github/workflows/publish-polaris-for-vscode.yml @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 07378892038..51b74707c91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 diff --git a/.nvmrc b/.nvmrc index 9dfef472196..ee09fac75c8 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.12.0 +v20.11.1 diff --git a/dev.yml b/dev.yml index 83940cd41d2..99527979930 100644 --- a/dev.yml +++ b/dev.yml @@ -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 diff --git a/polaris-tokens/package.json b/polaris-tokens/package.json index 06c660dc3b0..402a99c09f6 100644 --- a/polaris-tokens/package.json +++ b/polaris-tokens/package.json @@ -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" },