File tree Expand file tree Collapse file tree 3 files changed +83
-3
lines changed Expand file tree Collapse file tree 3 files changed +83
-3
lines changed Original file line number Diff line number Diff line change 1+ # .github/workflows/courses-test.yml
2+ name : Courses Package Tests
3+
4+ on :
5+ push :
6+ paths :
7+ - ' packages/courses/**'
8+ - ' .github/workflows/courses-test.yml'
9+ pull_request :
10+ paths :
11+ - ' packages/courses/**'
12+ - ' .github/workflows/courses-test.yml'
13+
14+ jobs :
15+ test :
16+ runs-on : ubuntu-latest
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v3
20+
21+ - name : Setup Node.js
22+ uses : actions/setup-node@v3
23+ with :
24+ node-version : ' 18'
25+ cache : ' yarn'
26+
27+ - name : Install dependencies
28+ run : yarn install --frozen-lockfile
29+
30+ - name : Build @vue-skuilder/common
31+ run : |
32+ cd packages/common
33+ yarn build
34+
35+ - name : Build @vue-skuilder/db
36+ run : |
37+ cd packages/db
38+ yarn build
39+
40+ - name : Build @vue-skuilder/common-ui
41+ run : |
42+ cd packages/common-ui
43+ yarn build
44+
45+ - name : Build @vue-skuilder/courses
46+ run : |
47+ cd packages/courses
48+ yarn build
49+
50+ - name : Run tests for @vue-skuilder/courses
51+ run : |
52+ cd packages/courses
53+ yarn test
54+
55+ - name : Report test results
56+ if : always()
57+ run : |
58+ echo "Courses package tests completed with status: ${{ job.status }}"
Original file line number Diff line number Diff line change 2020 "build" : " yarn clean && vite build" ,
2121 "clean" : " rm -rf dist" ,
2222 "dev" : " vite build --watch" ,
23- "type-check" : " tsc --noEmit"
23+ "type-check" : " tsc --noEmit" ,
24+ "test" : " vitest run" ,
25+ "test:watch" : " vitest"
2426 },
2527 "dependencies" : {
2628 "@vue-skuilder/common" : " workspace:*" ,
2729 "@vue-skuilder/common-ui" : " workspace:*" ,
2830 "@vue-skuilder/db" : " workspace:*" ,
2931 "lodash" : " ^4.17.21" ,
3032 "moment" : " ^2.29.4" ,
31- "paper" : " ^0.12.3" ,
3233 "vue" : " ^3.5.13"
3334 },
3435 "devDependencies" : {
3536 "@types/lodash" : " ^4.14.195" ,
3637 "@vitejs/plugin-vue" : " ^5.2.1" ,
38+ "jsdom" : " ^26.0.0" ,
3739 "typescript" : " ^5.7.2" ,
3840 "vite" : " ^6.0.9" ,
39- "vite-plugin-dts" : " ^4.5.3"
41+ "vite-plugin-dts" : " ^4.5.3" ,
42+ "vitest" : " ^3.0.5"
4043 },
4144 "peerDependencies" : {
4245 "vue" : " ^3.2.0"
Original file line number Diff line number Diff line change 1+ // packages/courses/vitest.config.ts
2+ import { defineConfig } from 'vitest/config' ;
3+ import vue from '@vitejs/plugin-vue' ;
4+ import { resolve } from 'path' ;
5+
6+ export default defineConfig ( {
7+ plugins : [ vue ( ) ] ,
8+ test : {
9+ environment : 'jsdom' ,
10+ globals : true ,
11+ include : [ '**/*.spec.ts' , '**/*.test.ts' ] ,
12+ exclude : [ '**/node_modules/**' , '**/dist/**' ] ,
13+ } ,
14+ resolve : {
15+ alias : {
16+ '@' : resolve ( __dirname , 'src' ) ,
17+ } ,
18+ } ,
19+ } ) ;
You can’t perform that action at this time.
0 commit comments