Skip to content

refactoring

refactoring #103

name: web@ci
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- "apps/web/**"
- ".github/workflows/[email protected]"
push:
branches:
- main
paths:
- "apps/web/**"
- ".github/workflows/[email protected]"
env:
pnpm-version: 9
node-version: 18
jobs:
check:
name: Type-check
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: ${{ env.pnpm-version }}
- uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: "pnpm"
- run: pnpm install
- run: pnpm type-check
working-directory: apps/web
build:
name: Build
needs: [check]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: ${{ env.pnpm-version }}
- uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: "pnpm"
- run: pnpm install -P
- run: pnpm build
working-directory: apps/web
test:
name: E2E
needs: [build]
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: ${{ env.pnpm-version }}
- uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: "pnpm"
- run: pnpm install
- run: pnpm exec playwright install --with-deps chromium
working-directory: apps/web
- run: pnpm test
working-directory: apps/web
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: apps/web/playwright-report/
retention-days: 7