Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a TPS integration test #223

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pull-request-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ jobs:
REDIS_URL: localhost
REDIS_CI: true
DATABASE_URL: "postgresql://admin:password@localhost:5432/protokit?schema=public"
INDEXER_DATABASE_URL: "postgresql://admin:password@localhost:5432/protokit?schema=public"

services:
postgres:
Expand Down Expand Up @@ -143,7 +144,7 @@ jobs:
run: npm run build

- name: "Migrate DB"
run: npm run migrate
run: npm run prisma:migrate

- name: "Wait for lightnet readiness"
uses: o1-labs/wait-for-mina-network-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.14.2
v23
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"test:ci": "npx lerna run test -- --passWithNoTests --forceExit",
"test:integration": "npx lerna run test:integration -- --passWithNoTests --forceExit",
"test:watch": "npx lerna run test:watch",
"migrate": "npx lerna run prisma-migrate",
"prisma-generate": "npx lerna run prisma-generate",
"prisma:migrate": "npx lerna run prisma:migrate",
"prisma:generate": "npx lerna run prisma:generate",
"commit": "cz",
"publish:canary": "npx lerna publish prerelease --no-private --exact --yes --canary --preid develop --dist-tag latest --loglevel verbose --force-git-tag --force-publish"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"license": "MIT",
"private": false,
"type": "module",
"version": "0.1.1-develop.833+397881ed",
"version": "0.1.1-develop.1087+9ab55c9b",
"scripts": {
"build": "tsc -p tsconfig.json",
"dev": "tsc -p tsconfig.json --watch",
"lint": "eslint ./src ./test",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js",
"test": "npm run test:file -- ./test/**",
"test:watch": "npm run test:file -- ./test/** --watch"
},
Expand Down Expand Up @@ -43,5 +43,5 @@
"@types/lodash": "^4.14.194",
"@types/ws": "^8.5.4"
},
"gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956"
"gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe"
}
6 changes: 3 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"license": "MIT",
"private": false,
"type": "module",
"version": "0.1.1-develop.833+397881ed",
"version": "0.1.1-develop.1087+9ab55c9b",
"scripts": {
"build": "tsc -p tsconfig.json",
"dev": "tsc -p tsconfig.json --watch",
"lint": "eslint ./src ./test",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js",
"test": "npm run test:file -- ./test/**",
"test:watch": "npm run test:file -- ./test/** --watch"
},
Expand All @@ -30,5 +30,5 @@
"@jest/globals": "^29.5.0",
"@types/lodash": "^4.14.194"
},
"gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956"
"gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe"
}
22 changes: 22 additions & 0 deletions packages/common/src/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ function logProvable(
/* eslint-enable */

export const log = {
timingEnabled: false,
enableTiming: () => {
log.timingEnabled = true;
},
disableTiming: () => {
log.timingEnabled = false;
},

provable: {
info: (...args: unknown[]) => {
logProvable(loglevel.info, ...args);
Expand Down Expand Up @@ -68,6 +76,20 @@ export const log = {
}
},

time: (name: string) => {
if (log.timingEnabled) {
// eslint-disable-next-line no-console
console.time(name);
}
},

timeEnd: (name: string) => {
if (log.timingEnabled) {
// eslint-disable-next-line no-console
console.timeEnd(name);
}
},

warn: (...args: unknown[]) => {
loglevel.warn(...args);
},
Expand Down
4 changes: 2 additions & 2 deletions packages/deployment/docker/base/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

if [[ ${DATABASE_URL} ]]; then
echo "Migrating on ${DATABASE_URL}"
npm run migrate;
npm run prisma:migrate;
fi
#LOGGING_LEVEL=${LOGGING_LEVEL}
node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads --es-module-specifier-resolution=node $@
node --experimental-vm-modules --experimental-wasm-modules --es-module-specifier-resolution=node $@
1 change: 0 additions & 1 deletion packages/deployment/docker/lightnet/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ services:
- 8080:8080
- 8181:8181
# archive endpoints
- 5432:5432
- 8282:8282
6 changes: 3 additions & 3 deletions packages/deployment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"license": "MIT",
"private": false,
"type": "module",
"version": "0.1.1-develop.833+397881ed",
"version": "0.1.1-develop.1087+9ab55c9b",
"scripts": {
"build": "tsc -p tsconfig.json",
"dev": "tsc -p tsconfig.json --watch",
"lint": "eslint ./src ./test",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js",
"test": "npm run test:file -- ./test/**",
"test:watch": "npm run test:file -- ./test/** --watch"
},
Expand All @@ -34,5 +34,5 @@
"devDependencies": {
"@jest/globals": "^29.5.0"
},
"gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956"
"gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe"
}
6 changes: 3 additions & 3 deletions packages/indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"license": "MIT",
"private": false,
"type": "module",
"version": "0.1.1-develop.267+b252853",
"version": "0.1.1-develop.1087+9ab55c9b",
"scripts": {
"prebuild": "npm run prisma:generate",
"build": "tsc -p tsconfig.json",
"dev": "tsc -p tsconfig.json --watch",
"lint": "eslint ./src ./test",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js",
"test": "npm run test:file -- ./src/** ./test/**",
"test:watch": "npm run test:file -- ./src/** ./test/** --watch",
"prisma:generate": "prisma generate --schema=./prisma/schema.prisma",
Expand Down Expand Up @@ -63,5 +63,5 @@
"@types/react": "^18.2.34",
"@types/ws": "^8.5.4"
},
"gitHead": "b2528538c73747d000cc3ea99ee26ee415d8248d"
"gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe"
}
6 changes: 3 additions & 3 deletions packages/library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"license": "MIT",
"private": false,
"type": "module",
"version": "0.1.1-develop.833+397881ed",
"version": "0.1.1-develop.1087+9ab55c9b",
"scripts": {
"build": "tsc -p tsconfig.json",
"dev": "tsc -p tsconfig.json --watch",
"lint": "eslint ./src ./test",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js",
"test": "npm run test:file -- ./test/**",
"test:watch": "npm run test:file -- ./test/** --watch"
},
Expand All @@ -34,5 +34,5 @@
"@jest/globals": "^29.5.0",
"@types/lodash": "^4.14.194"
},
"gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956"
"gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe"
}
6 changes: 3 additions & 3 deletions packages/module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "@proto-kit/module",
"license": "MIT",
"private": false,
"version": "0.1.1-develop.833+397881ed",
"version": "0.1.1-develop.1087+9ab55c9b",
"type": "module",
"scripts": {
"build": "tsc -p tsconfig.json",
"dev": "tsc -p tsconfig.json --watch",
"lint": "eslint ./src ./test",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js",
"test": "npm run test:file -- ./test/**",
"test:watch": "npm run test:file -- ./test/** --watch"
},
Expand All @@ -31,5 +31,5 @@
"o1js": "^1.1.0",
"tsyringe": "^4.7.0"
},
"gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956"
"gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe"
}
12 changes: 6 additions & 6 deletions packages/persistance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"license": "MIT",
"private": false,
"type": "module",
"version": "0.1.1-develop.833+397881ed",
"version": "0.1.1-develop.1087+9ab55c9b",
"scripts": {
"build": "npm run prisma-generate && tsc -p tsconfig.json",
"prisma-generate": "npx prisma generate",
"prisma-migrate": "npx prisma migrate deploy",
"build": "npm run prisma:generate && tsc -p tsconfig.json",
"prisma:generate": "npx prisma generate",
"prisma:migrate": "npx prisma migrate deploy",
"dev": "tsc -p tsconfig.json --watch",
"lint": "eslint ./src ./test ./test-integration",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules --experimental-wasm-threads ../../node_modules/jest/bin/jest.js",
"test:file": "node --experimental-vm-modules --experimental-wasm-modules ../../node_modules/jest/bin/jest.js",
"test": "npm run test:file -- ./test/**",
"test:integration": "npm run test:file -- ./test-integration/** --runInBand",
"test:watch": "npm run test:file -- ./test/** --watch"
Expand Down Expand Up @@ -38,5 +38,5 @@
"@jest/globals": "^29.5.0",
"@types/lodash": "^4.14.194"
},
"gitHead": "397881ed5d8f98f5005bcd7be7f5a12b3bc6f956"
"gitHead": "9ab55c9b0ab4476a75b47c4d3cd2dab9e6847ffe"
}
Loading
Loading