Skip to content

Commit

Permalink
chore: run tests tasks with turbo
Browse files Browse the repository at this point in the history
  • Loading branch information
sripwoud committed May 2, 2024
1 parent 8a0593b commit 0fcd4f8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
23 changes: 23 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]
}
}
}

0 comments on commit 0fcd4f8

Please sign in to comment.