-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add playwright config and github worklow to run e2e test (#606)
* add playwright config and github worklow to run e2e test * Add dev branch E2E test status to README.md * Update README.md
- Loading branch information
Showing
3 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Playwright Tests | ||
on: | ||
push: | ||
branches: [main, dev] | ||
pull_request: | ||
branches: [main, dev] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Install Playwright Browsers | ||
run: npx playwright install --with-deps | ||
- name: Build | ||
run: npm run build | ||
- name: Run Playwright tests | ||
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run test:playwright | ||
# if: matrix.os == 'ubuntu-latest' | ||
# - run: npm run test | ||
# if: matrix.os != 'ubuntu-latest' | ||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: test-output | ||
path: test-output/ | ||
retention-days: 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from "@playwright/test" | ||
|
||
export default defineConfig({ | ||
// 'github' for GitHub Actions CI to generate annotations, plus a concise 'dot' | ||
// default 'line' when running locally | ||
reporter: [[process.env.CI ? "html" : "line", { outputFolder: "test-output/playwright-report" }]], | ||
}) |