66 lines
1.5 KiB
YAML
66 lines
1.5 KiB
YAML
name: Quality Checks
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
lint-test-build:
|
|
name: Lint, Test and Build
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
BETTER_AUTH_SECRET: test-secret
|
|
NEXT_PUBLIC_APP_URL: http://localhost:3000
|
|
BETTER_AUTH_URL: http://localhost:3000
|
|
NEXT_PUBLIC_CONVEX_URL: http://localhost:3210
|
|
DATABASE_URL: file:./prisma/db.dev.sqlite
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: pnpm
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: 1.3.1
|
|
|
|
- name: Verify Bun
|
|
run: bun --version
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Cache Next.js build cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
${{ github.workspace }}/.next/cache
|
|
key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('**/*.{js,jsx,ts,tsx}') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}-
|
|
|
|
- name: Generate Prisma client
|
|
run: pnpm prisma:generate
|
|
|
|
- name: Lint
|
|
run: pnpm lint
|
|
|
|
- name: Test
|
|
run: pnpm test
|
|
|
|
- name: Build
|
|
run: pnpm build:bun
|