From 7b20922eb8128653c573160c914c72071ac93d0c Mon Sep 17 00:00:00 2001 From: Kris Urbas <605420+krzysu@users.noreply.github.com> Date: Thu, 18 Apr 2024 11:12:19 +0200 Subject: [PATCH] fix lens next app e2e test --- .github/workflows/lens-next-app.yaml | 26 +++++++++------------ examples/lens-next-app/README.md | 17 -------------- examples/lens-next-app/playwright.config.ts | 2 +- 3 files changed, 12 insertions(+), 33 deletions(-) diff --git a/.github/workflows/lens-next-app.yaml b/.github/workflows/lens-next-app.yaml index 86c8cd7620..d512cfba02 100644 --- a/.github/workflows/lens-next-app.yaml +++ b/.github/workflows/lens-next-app.yaml @@ -3,6 +3,8 @@ name: "Lens Next App E2E Test" on: push: branches: [main, develop] + pull_request: + branches: [main, develop] jobs: e2e: @@ -10,26 +12,20 @@ jobs: steps: - uses: actions/checkout@v4 - - - name: Setup pnpm - uses: pnpm/action-setup@v3 - - - name: Use Node.js - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4 with: - node-version-file: ".nvmrc" - cache: "pnpm" - - - name: Create a new Next.js App from the template - run: pnpm create next-app -e https://github.com/lens-protocol/lens-sdk/tree/develop/examples/lens-next-app test-app - - - run: cd test-app + node-version: lts/* - name: Install Playwright Browsers - run: pnpm exec playwright install --with-deps + run: npx playwright install --with-deps + + - name: Create a new Next.js App from the template + run: npx create-next-app -e https://github.com/lens-protocol/lens-sdk/tree/develop/examples/lens-next-app test-app - name: Run Playwright tests - run: pnpm run test:e2e + run: | + cd test-app + npm run test:e2e - name: Upload Playwright report uses: actions/upload-artifact@v4 diff --git a/examples/lens-next-app/README.md b/examples/lens-next-app/README.md index c4033664f8..4dc5f58728 100644 --- a/examples/lens-next-app/README.md +++ b/examples/lens-next-app/README.md @@ -17,20 +17,3 @@ bun dev Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. diff --git a/examples/lens-next-app/playwright.config.ts b/examples/lens-next-app/playwright.config.ts index 15ab36bfeb..1ca69bd5db 100644 --- a/examples/lens-next-app/playwright.config.ts +++ b/examples/lens-next-app/playwright.config.ts @@ -31,7 +31,7 @@ export default defineConfig({ }, /* Run your local dev server before starting the tests */ webServer: { - command: "pnpm dev", + command: "npm run dev", url: "http://localhost:3000", reuseExistingServer: !process.env.CI, },