Files
API/vitest.config.ts
PaddyandClaude Opus 5.5 43c7dccc9f
Test and deploy / test (pull_request) Successful in 32s
Test and deploy / deploy (pull_request) Skipped
Deploy with Gitea Actions instead of Jenkins
Tests every push and pull request (tsc, unit tests); pushes to master build,
prune dev dependencies and rsync dist/, src/, public/, node_modules/ and
package.json over SSH as the Plesk subscription user, then restart Passenger
via tmp/restart.txt. Only the app's own folders are mirrored with --delete;
.env, logs/ and tmp/ in the app root are never touched. Optional smoke test
via DEPLOY_SMOKE_URL. Same pattern as the calendar frontend; setup and what
the deploy may touch are in docs/deployment.md.

Also removes leftovers: bcrypt (unused since better-auth, and the only
production dependency with a native build) and the SonarQube setup
(sonar-project.properties, vitest-sonar-reporter).

Checked locally: actionlint; in a clean node:26 container npm ci, tsc,
233 unit tests, build and prune; the pruned bundle started against a
throwaway MariaDB (public feed, iCal, /docs, /admin/me); the upload step
against a throwaway SSH server with .env, logs/ and tmp/ in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 22:35:57 +01:00

25 lines
800 B
TypeScript

import {defineConfig} from 'vitest/config';
export default defineConfig({
test: {
include: ['test/**/*.test.ts'],
// The integration suite needs a Docker MariaDB and runs separately via
// npm run test:integration (vitest.integration.config.ts).
exclude: ['test/integration/**'],
environment: 'node',
// feedback.ratelimit throws at import time without a salt (see
// test/feedback/ratelimit.salt-guard.test.ts). Set one here so the suite
// passes on a clean checkout without a local .env; the salt-guard test
// deletes it explicitly before exercising the missing-salt path.
env: {
FEEDBACK_IP_SALT: 'vitest-salt'
},
coverage: {
provider: 'v8',
reporter: ['text-summary', 'lcov'],
reportsDirectory: 'coverage',
include: ['app.ts', 'src/**/*.ts']
}
}
});