feat: add unit tests and Gitea Actions CI pipeline
- Extract pure utility functions to lib/utils.ts for testability - Add 28 unit tests covering: computeNextDueDate, resetSubtasks, parseTaskIdentifier, validators, statusSortOrder - Add Gitea Actions workflow (.gitea/workflows/ci.yml) that runs tests and type checking on push/PR to main - Refactor tasks.ts to use extracted utils
This commit is contained in:
32
.gitea/workflows/ci.yml
Normal file
32
.gitea/workflows/ci.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test-backend:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: backend
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Run tests
|
||||
run: bun test --bail
|
||||
|
||||
- name: Type check
|
||||
run: bun x tsc --noEmit
|
||||
Reference in New Issue
Block a user