Skip to content

api: trustProxy so rate limiting actually keys on the real client IP #64

api: trustProxy so rate limiting actually keys on the real client IP

api: trustProxy so rate limiting actually keys on the real client IP #64

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9.14.2
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile
# Prisma client is needed for the API's typecheck (imports
# @prisma/client types). Run from repo root so Prisma finds
# prisma/schema.prisma at its default relative path; --filter
# would CD into apps/api/ where the schema doesn't exist.
- run: pnpm exec prisma generate
- name: Typecheck API
run: pnpm --filter @learncode/api build
- name: Build web
run: pnpm --filter @learncode/web build
# Only the self-contained unit tests. The known-good-solutions
# integration test needs a seeded DB and is skipped in CI.
- name: Unit tests (API)
run: pnpm --filter @learncode/api exec vitest run src/lib/testRunner.test.ts