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
28 changes: 17 additions & 11 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code Quality Check
name: Code Quality & Tests # Keeping this name as it accurately reflects both jobs

on:
push:
Expand All @@ -7,21 +7,27 @@ on:
branches: [main]

jobs:
lint:
code-quality: # Renamed job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest # Or a specific version
- name: Run Biome Check # Consolidated lint and format check
run: biome check ./src # This command checks both linting and formatting

test:
runs-on: ubuntu-latest
needs: code-quality # Depends on the renamed job
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: "22"
cache: "npm"

node-version: '18'
- name: Install dependencies
run: npm ci

- name: Run linting check
run: npm run lint:check
- name: Check formatting (Prettier)
run: npm run format:check
- name: Run tests
run: npm test
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,15 @@ This project uses a combination of tools for code formatting and linting to ensu

These formatting checks are automatically enforced in the CI pipeline (see `.github/workflows/code-quality.yml`) to maintain code quality.

## Running Tests

This project uses [Vitest](https://vitest.dev/) for unit testing. To run the tests, use the following npm scripts:

- `npm test`: Runs the tests once.
- `npm run test:watch`: Runs the tests in watch mode, automatically re-running them when files change.

Ensure you have installed the development dependencies by running `npm install` before executing the tests.

## License

MIT
Loading