Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SapiensAnatis committed Jun 8, 2024
1 parent c2c2cf5 commit af76c30
Show file tree
Hide file tree
Showing 8 changed files with 1,982 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-api.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test API
name: Test DragaliaAPI

on:
push:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/test-worker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test MaintenanceWorker

on:
pull_request:
branches:
- main
paths:
- MaintenanceWorker/**

jobs:
vitest:
runs-on: ubuntu-latest
steps:
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Install dependencies
run: |
cd MaintenanceWorker
pnpm install
- name: Run tests
run: pnpm run test
10 changes: 9 additions & 1 deletion MaintenanceWorker/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
{
"name": "maintenance-worker",
"packageManager": "[email protected]",
"version": "1.0.0",
"description": "Cloudflare worker for showing the maintenance screen even if the origin server is down",
"devDependencies": {
"@msgpack/msgpack": "3.0.0-beta2",
"@types/jest": "29.5.12",
"miniflare": "3.20240605.0",
"vitest": "1.6.0",
"vitest-environment-miniflare": "2.14.2",
"wrangler": "3.57.0"
},
"type": "module",
"scripts": {
"start": "pnpm exec wrangler dev"
"start": "pnpm exec wrangler dev",
"test": "pnpm exec vitest run"
}
}
Loading

0 comments on commit af76c30

Please sign in to comment.