This commit introduces a new step in the GitHub actions workflow file. 'Run App' step, which runs the development server, has been included right before running the Playwright tests. This change is essential for seeing a real-time reflection of changes in the dev server during the testing phase.
77 lines
1.7 KiB
YAML
77 lines
1.7 KiB
YAML
name: Workflow
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
jobs:
|
|
typescript:
|
|
timeout-minutes: 10
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
cache: 'pnpm'
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: .turbo
|
|
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-turbo-
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Typecheck
|
|
run: pnpm run typecheck
|
|
- name: Lint
|
|
run: pnpm run lint
|
|
|
|
test:
|
|
timeout-minutes: 15
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 8
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: .turbo
|
|
key: ${{ runner.os }}-turbo-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-turbo-
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: lts/*
|
|
cache: 'pnpm'
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
- name: Install Playwright Browsers
|
|
run: pnpm exec ./apps/e2e/node_modules/.bin/playwright install --with-deps
|
|
- name: Run App
|
|
run: pnpm run dev
|
|
- name: Run Playwright tests
|
|
run: pnpm run test
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: playwright-report
|
|
path: playwright-report/
|
|
retention-days: 30
|