diff --git a/package.json b/package.json index ed8fcfc1a..6ab9e8bc6 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,13 @@ "build:subgraph": "turbo --filter semaphore-subgraph build", "build:contracts": "turbo --filter semaphore-contracts build", "test": "yarn test:libraries && yarn test:contracts && yarn test:circuits && yarn test:subgraph", - "test:libraries": "jest --coverage", - "test:library": "jest packages/${0}", - "test:subgraph": "yarn workspace semaphore-subgraph test", - "test:contracts": "yarn workspace semaphore-contracts test:coverage", - "test:circuits": "yarn workspace @semaphore-protocol/circuits test", + "_test:libraries": "jest --coverage", + "test:libraries": "turbo _test:libraries", + "_test:library": "jest packages/${0}", + "test:library": "turbo _test:library", + "test:subgraph": "turbo --filter semaphore-subgraph test", + "test:contracts": "turbo --filter semaphore-contracts test:coverage", + "test:circuits": "turbo --filter @semaphore-protocol/circuits test", "_lint:eslint": "eslint . --ext .js,.ts,.tsx", "lint:eslint": "turbo _lint:eslint", "lint": "turbo _lint:eslint lint:solhint", diff --git a/turbo.json b/turbo.json index 7ce5b119e..b8bb01cb9 100644 --- a/turbo.json +++ b/turbo.json @@ -52,6 +52,29 @@ "lint:solhint": { "dependsOn": ["^build"], "inputs": ["packages/contracts/*.sol"] + }, + "test": { + "dependsOn": ["^build"], + "inputs": [ + "apps/subgraph/**/*.{json,ts}", + "!apps/subgraph/{build,generated}/**/*", + "packages/circuits/src/**/*.circom", + "packages/circuits/tests/*.ts" + ] + }, + "test:coverage": { + "dependsOn": ["^build"], + "inputs": ["packages/contracts/src/**/*.sol", "packages/contracts/test/**/*.ts"] + }, + "//#_test:libraries": { + "dependsOn": [ + "@semaphore-protocol/data#build", + "@semaphore-protocol/group#build", + "@semaphore-protocol/identity#build", + "@semaphore-protocol/proof#build", + "@semaphore-protocol/utils#build" + ], + "inputs": ["packages/{data,group,identity,proof,utils}/{src,tests}/*.{cjs,js,ts}"] } } }