ci(web): add playwright e2e job
This commit is contained in:
parent
ea1efb38e0
commit
d929247db5
61
.github/workflows/ci.yml
vendored
61
.github/workflows/ci.yml
vendored
@ -110,6 +110,67 @@ jobs:
|
|||||||
- name: Web build
|
- name: Web build
|
||||||
run: pnpm --filter @notelett/web run build
|
run: pnpm --filter @notelett/web run build
|
||||||
|
|
||||||
|
web-e2e:
|
||||||
|
name: Web E2E — Playwright
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: web
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Checkout common-plat (for @bytelyst/* packages)
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: saravanakumardb1/learning_ai_common_plat
|
||||||
|
path: learning_ai_common_plat
|
||||||
|
token: ${{ secrets.GH_PAT }}
|
||||||
|
|
||||||
|
- name: Link common-platform workspace path
|
||||||
|
run: |
|
||||||
|
mkdir -p ../learning_ai
|
||||||
|
ln -sfn "$GITHUB_WORKSPACE/learning_ai_common_plat" ../learning_ai/learning_ai_common_plat
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: pnpm
|
||||||
|
cache-dependency-path: pnpm-lock.yaml
|
||||||
|
|
||||||
|
- name: Enable pnpm
|
||||||
|
run: corepack enable
|
||||||
|
|
||||||
|
- name: Build @bytelyst/* packages
|
||||||
|
working-directory: learning_ai_common_plat
|
||||||
|
run: |
|
||||||
|
pnpm install --frozen-lockfile
|
||||||
|
pnpm build
|
||||||
|
|
||||||
|
- name: Install workspace dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Cache Playwright browsers
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-playwright-
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium
|
||||||
|
run: pnpm --filter @notelett/web exec playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Web Playwright E2E
|
||||||
|
run: pnpm --filter @notelett/web run test:e2e -- --reporter=list
|
||||||
|
|
||||||
|
- name: Upload Playwright report
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: web-playwright-report
|
||||||
|
path: |
|
||||||
|
web/playwright-report
|
||||||
|
web/test-results
|
||||||
|
if-no-files-found: ignore
|
||||||
|
|
||||||
mobile:
|
mobile:
|
||||||
name: Mobile — lint + typecheck + test
|
name: Mobile — lint + typecheck + test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@ -12,7 +12,7 @@ export default defineConfig({
|
|||||||
trace: "on-first-retry",
|
trace: "on-first-retry",
|
||||||
},
|
},
|
||||||
webServer: {
|
webServer: {
|
||||||
command: "npm run dev",
|
command: "pnpm run dev",
|
||||||
url: "http://localhost:3000",
|
url: "http://localhost:3000",
|
||||||
reuseExistingServer: !process.env.CI,
|
reuseExistingServer: !process.env.CI,
|
||||||
timeout: 120_000,
|
timeout: 120_000,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user