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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches: [ main ]
pull_request:

# Cancel superseded runs on the same ref to save CI minutes.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
quality-gate:
name: Lint, typecheck, test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

# Enable Corepack before setup-node so its yarn cache step can resolve the
# pinned Yarn 4 (from package.json `packageManager`) and find the cache folder.
- name: Enable Corepack
run: corepack enable

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn

- name: Install dependencies
run: yarn install --immutable

- name: Lint
run: yarn lint

- name: Typecheck
run: yarn typecheck

- name: Test
run: yarn test
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ yarn lint # run ESLint (flat config) over the repo
> The dev and preview servers are served under the `/chaiba/` base path (matching
> the GitHub Pages deployment), so open `http://localhost:5173/chaiba/`.

## Continuous integration

Every push to `main` and every pull request runs the CI quality gate
(`.github/workflows/ci.yml`) on Node 22 (LTS) with Yarn 4 via Corepack. The gate
runs three checks and fails the build if any of them fail:

```bash
yarn install --immutable # lockfile must be in sync (yarn.lock only)
yarn lint # ESLint — fails on errors (warnings are non-blocking)
yarn typecheck # tsc --noEmit
yarn test # Vitest unit suite
```

A PR cannot be merged green unless lint (no errors), typecheck, and the test
suite all pass. Run the same checks locally before pushing to avoid a red CI.

## Deployment

Pushes to `main` are built with Vite and published to GitHub Pages via
Expand Down
Loading