Skip to content

Commit 8e0988f

Browse files
authored
Merge pull request #224 from hypercerts-org/develop
Push to PRD
2 parents d6e61b8 + 8241c33 commit 8e0988f

File tree

88 files changed

+5562
-1403
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+5562
-1403
lines changed

.github/workflows/ci-test-unit.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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: ${{ secrets.ALCHEMY_API_KEY }}
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

commitlintrc.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
export default { extends: ["@commitlint/config-conventional"] };
1+
export default {
2+
extends: ["@commitlint/config-conventional"],
3+
rules: {
4+
"body-max-line-length": [2, "always", 500],
5+
},
6+
};

package.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
"supabase:types:data": "npx supabase gen types typescript --local > ./src/types/supabaseData.ts",
2020
"preintegration": "pnpm --dir ./lib/hypercerts-indexer i",
2121
"lint": "eslint",
22+
"scripts:blueprint-batch-mint": "tsx scripts/blueprint_batch_mint.ts",
2223
"test": "vitest",
24+
"test:coverage": "vitest --coverage.enabled true",
2325
"prepare": "husky",
2426
"commitlint": "commitlint --config commitlintrc.ts --edit"
2527
},
@@ -31,6 +33,8 @@
3133
"@hypercerts-org/sdk": "2.3.0",
3234
"@ipld/car": "^5.2.5",
3335
"@openzeppelin/merkle-tree": "^1.0.5",
36+
"@safe-global/api-kit": "^2.5.4",
37+
"@safe-global/protocol-kit": "^5.0.4",
3438
"@sentry/integrations": "^7.114.0",
3539
"@sentry/node": "^8.2.1",
3640
"@sentry/profiling-node": "^8.2.1",
@@ -51,6 +55,7 @@
5155
"cors": "^2.8.5",
5256
"ethers": "^6.12.2",
5357
"express": "^4.19.2",
58+
"file-type": "^19.6.0",
5459
"gql.tada": "^1.2.1",
5560
"graphql": "^16.8.1",
5661
"graphql-filter": "^1.1.5",
@@ -60,6 +65,9 @@
6065
"kysely": "^0.27.4",
6166
"lodash": "^4.17.21",
6267
"lru-cache": "^11.0.0",
68+
"mime-types": "^2.1.35",
69+
"multer": "1.4.5-lts.1",
70+
"node-cron": "^3.0.3",
6371
"pg": "^8.12.0",
6472
"reflect-metadata": "^0.2.2",
6573
"rollup": "^4.12.0",
@@ -86,17 +94,23 @@
8694
"@graphql-tools/schema": "^10.0.2",
8795
"@graphql-tools/stitch": "^9.0.3",
8896
"@graphql-tools/wrap": "^10.0.1",
97+
"@inquirer/prompts": "^7.2.3",
8998
"@rollup/plugin-typescript": "^11.1.6",
9099
"@sentry/types": "^8.2.1",
91100
"@swc/cli": "^0.3.12",
92101
"@swc/core": "^1.4.15",
93102
"@types/body-parser": "^1.19.5",
103+
"@types/mime-types": "^2.1.4",
104+
"@types/multer": "^1.4.12",
105+
"@types/node-cron": "^3.0.11",
94106
"@types/pg": "^8.11.6",
95107
"@types/sinon": "^17.0.2",
96108
"@types/swagger-ui-express": "^4.1.6",
109+
"@vitest/coverage-v8": "^2.1.8",
97110
"chai": "^5.0.0",
98111
"chai-assertions-count": "^1.0.2",
99112
"concurrently": "^8.2.2",
113+
"csv-parse": "^5.6.0",
100114
"dotenv": "^16.3.1",
101115
"eslint": "8.56.0",
102116
"husky": "^9.1.5",
@@ -115,7 +129,9 @@
115129
"typedoc": "^0.26.5",
116130
"typescript": "5.5.3",
117131
"typescript-eslint": "^7.7.0",
118-
"vitest": "^1.1.3"
132+
"vite-tsconfig-paths": "^5.1.4",
133+
"vitest": "^2.1.8",
134+
"vitest-mock-extended": "^2.0.2"
119135
},
120136
"lint-staged": {
121137
"*.{mjx,cjs,js,jsx,ts,tsx}": [

0 commit comments

Comments
 (0)