Merge pull request #66 from ArnasDon/ci/pr-checks

ci: typecheck + build on every PR
This commit is contained in:
Arnas Donauskas 2026-04-20 19:17:30 +03:00 committed by GitHub
commit fa257e0bd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 53 additions and 1 deletions

51
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,51 @@
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
# Cancel older CI runs for the same branch when a new commit arrives —
# saves minutes when someone pushes a stack of fixes to one PR.
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
name: Lint, typecheck, build
runs-on: ubuntu-latest
# Dummy env vars so `next build` doesn't fail when it reads the
# public Supabase config at build time. These never leave CI and
# never hit a real service — they just satisfy the `!` non-null
# assertions in the client factories.
env:
NEXT_PUBLIC_SUPABASE_URL: https://ci.example.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY: ci-dummy-anon-key
ENCRYPTION_KEY: '0000000000000000000000000000000000000000000000000000000000000000'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
# Lint is non-blocking for now — the repo has pre-existing
# `react-hooks/set-state-in-effect` errors surfaced by the React
# 19 rule set. The step still runs so regressions are visible,
# but a failure here doesn't block merges until the backlog is
# cleared in a follow-up PR.
- name: Lint
continue-on-error: true
run: npm run lint
- name: Typecheck
run: npm run typecheck
- name: Build
run: npm run build

View File

@ -6,7 +6,8 @@
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "eslint" "lint": "eslint",
"typecheck": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"@base-ui/react": "^1.4.0", "@base-ui/react": "^1.4.0",