Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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@v4
Comment thread
shazzar00ni marked this conversation as resolved.
Outdated
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@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: npx tsc --noEmit
Comment thread
shazzar00ni marked this conversation as resolved.
Outdated

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@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@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
11 changes: 11 additions & 0 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 `npx tsc --noEmit` to catch type errors without building.
Comment thread
shazzar00ni marked this conversation as resolved.
Outdated
- **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
Loading