Skip to content

Commit

Permalink
feat: added build e2e scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
field123 committed Sep 24, 2023
1 parent a7dcc74 commit f4713a7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/generate-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ jobs:
cat .env.test
ls -la
ls -la ./examples/basic
echo ./examples/basic/.env.test
cat ./examples/basic/.env.test
- name: Build everything
run: yarn build
run: yarn build:e2e

- name: Install playwright browsers
run: npx playwright install --with-deps
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
],
"scripts": {
"build": "turbo run build",
"build:e2e": "turbo run build --filter='./packages/*' && turbo run build:e2e --filter='./examples/*'",
"generate": "turbo run generate --parallel --filter=!@elasticpath/composable-common",
"dev": "turbo run dev --parallel",
"lint": "turbo run lint",
Expand All @@ -19,7 +20,7 @@
"test": "turbo run test",
"test:packages": "turbo run test --filter='./packages/*'",
"test:watch": "turbo run test:watch",
"start:e2e": "turbo run start --filter='./examples/basic'",
"start:e2e": "turbo run start:e2e --filter='./examples/basic'",
"test:e2e": "NODE_ENV=test yarn start:e2e & (sleep 5 && turbo run test:e2e --filter='./examples/basic' && kill $(lsof -t -i tcp:3000))",
"build:cli": "turbo run build --filter=composable-cli...",
"build:packages": "turbo run build --filter='./packages/*'",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"test:coverage": "vitest run --coverage",
"test:watch": "vitest",
"test:ci:e2e": "NODE_ENV=test yarn build && (yarn start & (sleep 5 && npx playwright install --with-deps && yarn test:e2e && kill $(lsof -t -i tcp:3000)))",
"test:e2e": "NODE_ENV=test playwright test"<% } %>
"test:e2e": "NODE_ENV=test playwright test",
"build:e2e": "NODE_ENV=test next build",
"start:e2e": "NODE_ENV=test next start"<% } %>
},
"dependencies": {
"@moltin/sdk": "<%= latestVersions['@moltin/sdk'] %>",
Expand Down

0 comments on commit f4713a7

Please sign in to comment.