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
21 changes: 15 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Dependencies
run: npm install -g pnpm && pnpm install
- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/setup-node@v4

- name: Copy .env.example files
shell: bash
run: find . -type f -name ".env.example" -exec sh -c 'cp "$1" "${1%.*}"' _ {} \;
with:
node-version: 22
cache: pnpm

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Typecheck
run: pnpm typecheck

- name: Check
run: pnpm check

- name: Test
run: pnpm test
17 changes: 16 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
#!/bin/sh

pnpm check && pnpm typecheck
run_step() {
label="$1"
shift
output=$("$@" 2>&1)
status=$?
if [ $status -ne 0 ]; then
echo "✗ $label failed"
echo "$output"
exit $status
fi
echo "✓ $label done"
}

run_step "check" pnpm check
run_step "typecheck" pnpm typecheck
run_step "test" pnpm test:unit
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
"preview": "next build && next start",
"start": "next start",
"typecheck": "tsc --noEmit",
"test": "vitest run",
"test:watch": "vitest",
"test:ui": "vitest --ui",
"test:unit": "vitest run --exclude tests/integration/**",
"test:integration": "vitest run tests/integration",
"prepare": "husky"
},
"dependencies": {
Expand Down Expand Up @@ -53,12 +58,14 @@
"@types/node": "^20.14.10",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^6.0.3",
"husky": "^9.1.7",
"oxfmt": "^0.54.0",
"oxlint": "^1.69.0",
"postcss": "^8.5.3",
"tailwindcss": "^4.0.15",
"typescript": "^5.8.2"
"typescript": "^5.8.2",
"vitest": "^4.1.10"
},
"packageManager": "pnpm@11.3.0",
"ct3aMetadata": {
Expand Down
Loading
Loading