File tree Expand file tree Collapse file tree 4 files changed +473
-202
lines changed
Expand file tree Collapse file tree 4 files changed +473
-202
lines changed Original file line number Diff line number Diff line change 1+ name : " Unit tests"
2+ on :
3+ pull_request :
4+
5+ jobs :
6+ unit-test :
7+ runs-on : ubuntu-latest
8+ environment : test
9+
10+ env :
11+ PORT : 4000
12+ SUPABASE_CACHING_DB_URL : " https://test.supabase.com"
13+ SUPABASE_CACHING_ANON_API_KEY : " test"
14+ SUPABASE_DATA_DB_URL : " https://test.supabase.com"
15+ SUPABASE_DATA_SERVICE_API_KEY : " test"
16+ KEY : " test"
17+ PROOF : " test"
18+
19+ ALCHEMY_API_KEY : " test"
20+ DRPC_API_KEY : " test"
21+ INFURA_API_KEY : " test"
22+
23+ INDEXER_ENVIRONMENT : " test"
24+
25+ CACHING_DATABASE_URL : " https://test.supabase.com"
26+ DATA_DATABASE_URL : " https://test.supabase.com"
27+
28+ permissions :
29+ # Required to checkout the code
30+ contents : read
31+ # Required to put a comment into the pull-request
32+ pull-requests : write
33+
34+ steps :
35+ - uses : actions/checkout@v4
36+ - name : " Install Node"
37+ uses : actions/setup-node@v4
38+ with :
39+ node-version : " 20.x"
40+
41+ - uses : pnpm/action-setup@v4
42+ name : Install pnpm
43+ with :
44+ run_install : false
45+ - name : Install dependencies
46+ run : pnpm install
47+
48+ - name : " Run unit tests"
49+ run : pnpm test:coverage
50+ - name : " Report Coverage"
51+ # Set if: always() to also generate the report if tests are failing
52+ # Only works if you set `reportOnFailure: true` in your vite config as specified above
53+ if : always()
54+ uses : davelosert/vitest-coverage-report-action@v2
Original file line number Diff line number Diff line change 2020 "preintegration" : " pnpm --dir ./lib/hypercerts-indexer i" ,
2121 "lint" : " eslint" ,
2222 "test" : " vitest" ,
23+ "test:coverage" : " vitest --coverage.enabled true" ,
2324 "prepare" : " husky" ,
2425 "commitlint" : " commitlint --config commitlintrc.ts --edit"
2526 },
9899 "@types/pg" : " ^8.11.6" ,
99100 "@types/sinon" : " ^17.0.2" ,
100101 "@types/swagger-ui-express" : " ^4.1.6" ,
102+ "@vitest/coverage-v8" : " ^2.1.8" ,
101103 "chai" : " ^5.0.0" ,
102104 "chai-assertions-count" : " ^1.0.2" ,
103105 "concurrently" : " ^8.2.2" ,
120122 "typescript" : " 5.5.3" ,
121123 "typescript-eslint" : " ^7.7.0" ,
122124 "vite-tsconfig-paths" : " ^5.1.4" ,
123- "vitest" : " ^1 .1.3 " ,
125+ "vitest" : " ^2 .1.8 " ,
124126 "vitest-mock-extended" : " ^2.0.2"
125127 },
126128 "lint-staged" : {
You can’t perform that action at this time.
0 commit comments