Skip to content
Open
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
71 changes: 41 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
name: CI
permissions:
contents: read

permissions:
contents: read
Expand All @@ -13,53 +11,66 @@ on:

jobs:
lint:
name: Lint
name: Lint & Style Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@v4
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run lint

- name: Super-Linter
- uses: super-linter/super-linter@v8.6.0

cache: npm
- name: Install dependencies
run: npm ci
- name: Run ESLint
run: npm run lint

typecheck:
name: TypeScript Check
name: TypeScript Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@v4
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npx tsc --noEmit
cache: npm
- name: Install dependencies
run: npm ci
- name: Run TypeScript compiler
run: npm run typecheck

test:
name: Tests
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@v4
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run test:run
cache: npm
- name: Install dependencies
run: npm ci
- name: Run test suite
run: npm run test:run

build:
name: Build
name: Production Build
runs-on: ubuntu-latest
needs: [lint, typecheck, test]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-node@v4
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '20'
cache: 'npm'
- run: npm ci
- run: npm run build
cache: npm
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
15 changes: 13 additions & 2 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ All tests should pass.
git push origin feature/your-feature-name
```

### CI Jobs (GitHub Actions)

The `.github/workflows/ci.yml` workflow runs four focused jobs on pushes and pull requests to `main`:

- **Lint & Style Check**: Runs `npm run lint` to enforce ESLint and style rules.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 The description says "ESLint and style rules", implying Prettier formatting is enforced here. In practice the lint job only runs npm run lint (ESLint); npm run format:check is never called in CI. A PR from a fork or a direct push that skips lint-staged will pass CI even if the code is unformatted. Either add format:check to the job or tighten the wording so it doesn't suggest Prettier is checked.

Suggested change
- **Lint & Style Check**: Runs `npm run lint` to enforce ESLint and style rules.
- **Lint & Style Check**: Runs `npm run lint` to enforce ESLint rules.

- **TypeScript Type Check**: Runs `npm run typecheck` to catch type errors without building.
- **Unit Tests**: Runs `npm run test:run` to execute the Vitest suite in CI mode.
- **Production Build**: Runs `npm run build` after lint, typecheck, and tests pass to verify production build integrity.

This split makes failures easier to diagnose and keeps merge checks explicit.

## Project Structure

Understanding the project layout is crucial for effective development.
Expand Down Expand Up @@ -648,7 +659,7 @@ npm install

```bash
# Check TypeScript compilation
npx tsc --noEmit
npm run typecheck

# Restart TypeScript server in VS Code
Cmd/Ctrl + Shift + P → "TypeScript: Restart TS Server"
Expand Down Expand Up @@ -681,7 +692,7 @@ npm run test -- --reporter=verbose

```bash
# Check for TypeScript errors first
npx tsc --noEmit
npm run typecheck

# Check for linting errors
npm run lint
Expand Down
Loading