ci: add Gitea Actions workflow and unit tests
CI / Build & Test (push) Failing after 5s

- Add .gitea/workflows/ci.yml: runs build + tests on push/PR to main
- Add vitest as dev dependency
- Add src/utils.test.ts: 4 tests covering handleTool success, Error throw,
  non-Error throw, and arg passthrough
- Add src/client.test.ts: 12 tests covering URL building, Authorization header,
  query string params, Content-Type presence/absence, error handling with
  message extraction and statusText fallback, and HTTP method correctness

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Space-Banane
2026-06-17 22:09:54 +02:00
parent a1d47d4819
commit 75ecb6232c
4 changed files with 235 additions and 1 deletions
+34
View File
@@ -0,0 +1,34 @@
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
ci:
name: Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v6
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Test
run: pnpm test