Skip to content

Merge pull request #4659 from Shopify/fio/node24-github-actions #17669

Merge pull request #4659 from Shopify/fio/node24-github-actions

Merge pull request #4659 from Shopify/fio/node24-github-actions #17669

Workflow file for this run

name: CI
on: [push]
jobs:
type-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/workflows/actions/prepare
- id: typescript-cache
name: Restore TypeScript cache
uses: actions/cache@v4
with:
path: |
packages/*/build/ts
packages/*/build/*.tsbuildinfo
key: ${{ runner.os }}-typescript-v1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-typescript-v1-
- name: Type check
run: yarn type-check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/workflows/actions/prepare
- id: eslint-cache
name: Restore ESLint cache
uses: actions/cache@v4
with:
path: .loom/cache/eslint
key: ${{ runner.os }}-eslint-v1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-eslint-v1-
- name: Lint
run: yarn lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/workflows/actions/prepare
- name: Build packages
run: yarn build
# publint checks that every package.json entry point resolves to files
# that actually ship in the npm tarball; attw checks that types resolve
# under every TypeScript moduleResolution mode (including node10, which
# needs typesVersions entries mirroring exports). false-cjs is ignored:
# the package's ESM types are declared with .d.ts instead of .d.mts,
# which is pre-existing and harmless for bundled extension code.
- name: Validate ui-extensions package entry points
run: |
yarn workspace @shopify/ui-extensions package:publint
yarn workspace @shopify/ui-extensions package:attw
- name: Typecheck ui-extensions-tester (including tests)
run: npx tsc --project packages/ui-extensions-tester/tsconfig.typecheck.json
- name: Test ui-extensions-tester
run: npx loom test --no-watch packages/ui-extensions-tester/
- name: Testing example (checkout)
run: npm install && npm run typecheck && npm test
working-directory: examples/testing/checkout-basic-testing-example
- name: Testing example (point-of-sale)
run: npm install && npm run typecheck && npm test
working-directory: examples/testing/point-of-sale-testing-example
- name: Testing example (customer-account)
run: npm install && npm run typecheck && npm test
working-directory: examples/testing/customer-account-testing-example
- name: Testing example (admin)
run: npm install && npm run typecheck && npm test
working-directory: examples/testing/admin-testing-example
test-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/workflows/actions/prepare
- id: test-build
name: Build docs locally to ensure they can be built in CI
run: yarn docs:admin