name: CI on: push: branches: [main] pull_request: jobs: check: runs-on: ubuntu-latest services: postgres: image: postgis/postgis:16-3.4 env: POSTGRES_USER: linkder POSTGRES_PASSWORD: linkder POSTGRES_DB: linkder ports: ['5442:5432'] options: >- --health-cmd "pg_isready -U linkder -d linkder" --health-interval 5s --health-timeout 5s --health-retries 10 redis: image: redis:7-alpine ports: ['6389:6379'] options: >- --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 10 env: DATABASE_URL: postgresql://linkder:linkder@localhost:5442/linkder REDIS_URL: redis://localhost:6389 NEXT_PUBLIC_CITY_LAT: '41.3874' NEXT_PUBLIC_CITY_LNG: '2.1686' NEXT_PUBLIC_CITY_NAME: Barcelona # Without a secret better-auth silently uses a built-in default. AUTH_SECRET: ci-only-secret-not-used-anywhere-else-000000 NEXT_PUBLIC_APP_URL: http://localhost:3000 steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 with: version: 9 - uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm - run: pnpm install --frozen-lockfile # The integration tests assert against exact seeded distances, so the # database must be migrated and seeded before they run. - run: cp .env.example .env - run: pnpm db:migrate - run: pnpm db:seed - run: pnpm typecheck - run: pnpm lint - run: pnpm test - run: pnpm build