Minimal Vitest project template using pnpm with GitHub Actions workflow for syncing test results to Automaspec.
- Copy this folder to your project or use it as a template
- Install dependencies:
pnpm install
- Run tests locally:
pnpm test
- Go to your Automaspec instance
- Navigate to Profile → API Keys
- Click Create API Key
- Copy the generated key
Add these secrets to your repository (Settings → Secrets and variables → Actions):
| Secret | Value |
|---|---|
AUTOMASPEC_API_KEY |
Your API key from Step 1 |
AUTOMASPEC_WEBHOOK_URL |
https://your-automaspec-instance.com/api/webhook/sync-tests |
Copy .github/workflows/automaspec-sync.yml to your project's .github/workflows/ folder.
Test names in your it() blocks should match requirement names in Automaspec:
// In Automaspec: Create a requirement named "should add two numbers correctly"
// In your test file:
it('should add two numbers correctly', () => {
expect(2 + 2).toBe(4)
})The matching is case-insensitive, so "Should Add Two Numbers Correctly" will match "should add two numbers correctly".
| Script | Description |
|---|---|
pnpm test |
Run tests in watch mode |
pnpm run test:run |
Run tests once |
pnpm run test:json |
Run tests and output JSON report |