Skip to content

Add basic Next.js unit tests and CI workflow #1

Add basic Next.js unit tests and CI workflow

Add basic Next.js unit tests and CI workflow #1

Workflow file for this run

name: Test Next.js
on:
push:
branches: [main]
paths:
- 'src/**'
- 'vitest.config.ts'
- 'vitest.setup.ts'
- 'package.json'
- 'pnpm-lock.yaml'
- '.github/workflows/test-nextjs.yml'
pull_request:
branches: [main]
paths:
- 'src/**'
- 'vitest.config.ts'
- 'vitest.setup.ts'
- 'package.json'
- 'pnpm-lock.yaml'
- '.github/workflows/test-nextjs.yml'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run linter
run: pnpm lint
- name: Run tests
run: pnpm test