Skip to content

feat: support role

feat: support role #44

Workflow file for this run

name: ci
on:
pull_request:
branches: [main]
paths:
- "package.json"
- "src/**"
- ".github/workflows/ci.yml"
push:
branches: [main]
paths:
- "package.json"
- "src/**"
- ".github/workflows/ci.yml"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- run: pnpm lint
- run: pnpm fmt
build:
runs-on: ubuntu-latest
env:
POSTGRES_URL: "postgresql://dev:1234@localhost:5432/dev?schema=public"
NEXT_PUBLIC_SITE_URL: "http://localhost:3000"
NEXTAUTH_SECRET: UfxvOS6HetHOFkL44YTITYgc0DOuOlz5TBp3jkbnZ3w=
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- run: cp ./.env.sample ./.env.local
- run: pnpm dev:db:setup
- run: pnpm build
- uses: actions/upload-artifact@v4
with:
name: app
path: .next
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
### πŸ‘‰ please remove ###
- run: cp ./.env.sample ./.env.local
- run: pnpm dev:db:setup
env:
POSTGRES_URL: "postgresql://dev:1234@localhost:5432/dev?schema=public"
NEXT_PUBLIC_SITE_URL: "http://localhost:3000"
########################
- run: pnpm test:db:setup
- run: pnpm test
e2e-test:
needs: [build]
runs-on: ubuntu-latest
env:
NEXTAUTH_SECRET: UfxvOS6HetHOFkL44YTITYgc0DOuOlz5TBp3jkbnZ3w=
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- run: pnpm exec playwright install chromium
### πŸ‘‰ please remove ###
- run: cp ./.env.sample ./.env.local
- run: pnpm dev:db:setup
env:
POSTGRES_URL: "postgresql://dev:1234@localhost:5432/dev?schema=public"
NEXT_PUBLIC_SITE_URL: "http://localhost:3000"
########################
- run: pnpm test:db:setup
- uses: actions/download-artifact@v4
with:
name: app
path: .next
- run: pnpm test:e2e