File tree Expand file tree Collapse file tree 5 files changed +35
-21
lines changed Expand file tree Collapse file tree 5 files changed +35
-21
lines changed Original file line number Diff line number Diff line change 3333
3434 # Install dependencies
3535 - name : 📦 Install dependencies
36- run : |
37- npm ci
36+ run : npm ci
3837
3938 # Lint code
4039 - name : 🧹 Lint code
4544 run : npm run format:check
4645
4746 # Run tests
48- - name : 🧪 Run tests
49- run : npm test
47+ - name : 🧪 Run unit tests
48+ run : npm run test:unit
49+
50+ # Setup PocketBase
51+ - name : 🗄️ Download and setup PocketBase
52+ run : npm run test:e2e:setup
53+
54+ # Start PocketBase
55+ - name : 🚀 Start PocketBase
56+ run : ./.pocketbase/pocketbase serve &
57+
58+ # Wait for PocketBase to be ready
59+ - name : ⏳ Wait for PocketBase
60+ run : |
61+ until curl -s --fail http://localhost:8090/api/health; do
62+ echo 'Waiting for PocketBase...'
63+ sleep 5
64+ done
65+
66+ # Run tests
67+ - name : 🧪 Run e2e tests
68+ run : npm run test:e2e
5069
5170 # Create release
5271 - name : 🚀 Create release
Original file line number Diff line number Diff line change 4545 run : npm run format:check
4646
4747 # Run tests
48- - name : 🧪 Run tests
49- run : npm test
48+ - name : 🧪 Run unit tests
49+ run : npm run test:unit
5050
5151 # Setup PocketBase
5252 - name : 🗄️ Download and setup PocketBase
Original file line number Diff line number Diff line change 2020 "prepare" : " husky" ,
2121 "test" : " vitest run" ,
2222 "test:watch" : " vitest watch" ,
23- "test:ui " : " vitest --ui " ,
24- "test:e2e " : " vitest run --config vitest.config-e2e .ts" ,
25- "test:e2e:watch " : " vitest watch --config vitest.config- e2e.ts" ,
26- "test:e2e:ui " : " vitest --ui --config vitest.config- e2e.ts" ,
23+ "test:unit " : " vitest run $(find test -name '*.spec.ts') " ,
24+ "test:unit:watch " : " vitest watch $(find test -name '*.spec .ts') " ,
25+ "test:e2e" : " vitest run $(find test -name '*. e2e-spec .ts') " ,
26+ "test:e2e:watch " : " vitest watch $(find test -name '*. e2e-spec .ts') " ,
2727 "test:e2e:setup" : " ./scripts/setup-pocketbase.sh" ,
28- "test:e2e:pocketbase" : " ./.pocketbase/pocketbase serve"
28+ "test:e2e:pocketbase" : " npm run test:e2e:setup && ./.pocketbase/pocketbase serve"
2929 },
3030 "peerDependencies" : {
3131 "astro" : " ^5.0.0"
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -2,7 +2,10 @@ import { defineConfig } from "vite";
22
33export default defineConfig ( {
44 test : {
5- include : [ "test/**/*.spec.ts" ] ,
6- silent : true
5+ include : [ "test/**/*.spec.ts" , "test/**/*.e2e-spec.ts" ] ,
6+ silent : true ,
7+ coverage : {
8+ include : [ "src/**/*.ts" ]
9+ }
710 }
811} ) ;
You can’t perform that action at this time.
0 commit comments