Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,41 @@ up:
meet: mkdir -p bin && printf '#!/bin/sh\nexec pnpm "$@"\n' > bin/p && chmod +x bin/p
- custom:
name: 'Install PNPM dependencies'
# we flip these two conditions to always run `pnpm install`
# whenever we run dev up.
met?: pnpm install
meet: 'true'
met?: |
test -d node_modules/.pnpm &&
test -x node_modules/.bin/nx &&
test "$(printf 'node %s\npnpm %s\n' "$(node --version)" "$(pnpm --version)" && cksum package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc .nvmrc dev.yml 2>/dev/null)" = "$(cat node_modules/.dev-up/pnpm-install 2>/dev/null)"
meet: |
pnpm install &&
mkdir -p node_modules/.dev-up &&
(printf 'node %s\npnpm %s\n' "$(node --version)" "$(pnpm --version)" && cksum package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc .nvmrc dev.yml) > node_modules/.dev-up/pnpm-install
- custom:
name: 'Get GraphQL schemas'
# Always fetch these on dev up
met?: pnpm graphql-codegen:get-graphql-schemas
meet: 'true'
- custom:
name: 'Install Playwright Chromium'
met?: cd packages/e2e && pnpx playwright install chromium
meet: 'true'
met?: |
test "$(printf 'node %s\n' "$(node --version)" && cksum packages/e2e/package.json pnpm-lock.yaml dev.yml 2>/dev/null)" = "$(cat node_modules/.dev-up/playwright-chromium 2>/dev/null)" &&
cd packages/e2e &&
node --input-type=module -e "import {existsSync} from 'node:fs'; import {chromium} from '@playwright/test'; process.exit(existsSync(chromium.executablePath()) ? 0 : 1)"
meet: |
cd packages/e2e &&
pnpm exec playwright install chromium &&
cd ../.. &&
mkdir -p node_modules/.dev-up &&
(printf 'node %s\n' "$(node --version)" && cksum packages/e2e/package.json pnpm-lock.yaml dev.yml) > node_modules/.dev-up/playwright-chromium
- custom:
name: 'Rebuild node-pty'
met?: pnpm rebuild node-pty
meet: 'true'
met?: |
test "$(printf 'node %s\n' "$(node --version)" && cksum packages/e2e/package.json pnpm-lock.yaml dev.yml 2>/dev/null)" = "$(cat node_modules/.dev-up/node-pty-rebuild 2>/dev/null)" &&
cd packages/e2e &&
node -e "require('node-pty')"
meet: |
pnpm rebuild node-pty &&
mkdir -p node_modules/.dev-up &&
(printf 'node %s\n' "$(node --version)" && cksum packages/e2e/package.json pnpm-lock.yaml dev.yml) > node_modules/.dev-up/node-pty-rebuild

env:
SHOPIFY_CLI_ENV: development
Expand Down
Loading