Skip to content

Commit c5bc24d

Browse files
committed
ci(playwright): Add Playwright E2E tests to CI workflow
This sets up the playwright tests the same way the existing integration tests are setup today to prove they can work well in CI. Integrates the Playwright E2E test suite into the `code-qa.yml` CI workflow. This new job, `playwright-e2e-test`, runs only if an `OPENROUTER_API_KEY` secret is available, ensuring that the tests are executed in environments where the necessary API key is provided.
1 parent 11af86d commit c5bc24d

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/code-qa.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,28 @@ jobs:
9090
working-directory: apps/vscode-e2e
9191
run: xvfb-run -a pnpm test:ci
9292

93+
playwright-e2e-test:
94+
runs-on: ubuntu-latest
95+
needs: [check-openrouter-api-key]
96+
if: needs.check-openrouter-api-key.outputs.exists == 'true'
97+
steps:
98+
- name: Checkout code
99+
uses: actions/checkout@v4
100+
- name: Setup Node.js and pnpm
101+
uses: ./.github/actions/setup-node-pnpm
102+
- name: Install Playwright browsers
103+
working-directory: apps/playwright-e2e
104+
run: npx playwright install --with-deps
105+
- name: Create .env.local file
106+
working-directory: apps/playwright-e2e
107+
run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.local
108+
- name: Run Playwright E2E tests
109+
working-directory: apps/playwright-e2e
110+
run: xvfb-run -a pnpm test:ci
111+
93112
notify-slack-on-failure:
94113
runs-on: ubuntu-latest
95-
needs: [check-translations, knip, compile, unit-test, integration-test]
114+
needs: [check-translations, knip, compile, unit-test, integration-test, playwright-e2e-test]
96115
if: ${{ always() && github.event_name == 'push' && github.ref == 'refs/heads/main' && contains(needs.*.result, 'failure') }}
97116
steps:
98117
- name: Checkout code

0 commit comments

Comments
 (0)