Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: Tests

on:
push:
branches: [main, development-05]
pull_request:
branches: [main, development-05]

jobs:
unit-tests:
runs-on: ubuntu-latest
name: Unit Tests

strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run unit tests
run: pnpm test

- name: Generate coverage report
run: pnpm test:coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage/coverage-final.json
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

lint:
runs-on: ubuntu-latest
name: Lint & Type Check

steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint code
run: pnpm lint

- name: Type check
run: pnpm typecheck

e2e-tests:
runs-on: ubuntu-latest
name: E2E Tests

steps:
- uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build application
run: pnpm build

- name: Run E2E tests
run: pnpm test:e2e:headless
continue-on-error: true
Comment on lines +100 to +102
Copy link

Copilot AI Apr 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The E2E job builds the Next app and then runs cypress run, but it never starts a server on http://localhost:3000, so Cypress will fail to load baseUrl. Additionally, continue-on-error: true masks failures, so the workflow can go green even when E2E is broken. Start the app in the background (e.g., pnpm start with a wait-on) and remove continue-on-error if E2E is meant to gate CI.

Suggested change
- name: Run E2E tests
run: pnpm test:e2e:headless
continue-on-error: true
- name: Start application
run: pnpm start &
- name: Wait for application to be ready
run: npx wait-on http://localhost:3000
- name: Run E2E tests
run: pnpm test:e2e:headless

Copilot uses AI. Check for mistakes.

- name: Upload Cypress screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots

- name: Upload Cypress videos
uses: actions/upload-artifact@v3
if: always()
with:
name: cypress-videos
path: cypress/videos
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

# testing
/coverage
cypress.env.json

# next.js
/.next/
Expand Down
Loading
Loading