Skip to content

[PR]: Add Analytics and vercel setup. #20

[PR]: Add Analytics and vercel setup.

[PR]: Add Analytics and vercel setup. #20

Workflow file for this run

name: Build & Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ci:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
# Setup environment (Node and pnpm)
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- uses: pnpm/action-setup@v4
with:
version: latest
# Install dependencies
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
# Run `markdownlint-cli2` to lint markdown files
- name: Running `markdownlint-cli2`
run: pnpm run lint:check-markdown
# Run script to check for dead links
- name: Checking for dead links
run: pnpm run lint:check-external-links
# Run build
- name: Build Next.js app
run: pnpm run build
# Run unit tests
- name: Running unit tests
run: pnpm run test
# Run E2E tests
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
env:
AUTH_SECRET: some_nextauth_secret
TEST_PASSWORD: password
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
# Upload coverage to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}