Skip to content

Commit ef5b501

Browse files
authored
test(network-subgraphs): [ETH-893] Move network subgraph smoke test (#1023)
The new location is better than the previous location (the `network-contracts` subpackage) as it tests the subgraphs, not contracts.
1 parent 313024e commit ef5b501

File tree

7 files changed

+27
-23
lines changed

7 files changed

+27
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ jobs:
7272
uses: streamr-dev/streamr-docker-dev-action@v1.0.1
7373
with:
7474
services-to-start: 'deploy-network-subgraphs-fastchain'
75-
- name: Integration Test (with locally built images)
75+
- name: Smoke Test (with locally built images)
7676
env:
7777
TEST_TIMEOUT: '600000'
7878
DEBUG: "*,-mocha:*"
79-
run: npm run integration-test
79+
run: npm run smoke-test -w packages/network-subgraphs
8080

8181
# - name: Build & Push
8282
# uses: docker/build-push-action@v4.1.1

package-lock.json

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/network-contracts/.vscode/launch.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,6 @@
5959
],
6060
"type": "pwa-node"
6161
},
62-
{
63-
"type": "node",
64-
"request": "launch",
65-
"name": "Mocha Test All with Options",
66-
"program": "${workspaceFolder}/node_modules/ts-mocha/bin/ts-mocha",
67-
"args": [
68-
"${workspaceFolder}/test/*.test.ts",
69-
"--timeout",
70-
"200000"
71-
],
72-
"skipFiles": [
73-
"<node_internals>/**/*.js"
74-
]
75-
},
7662
{
7763
"type": "node",
7864
"request": "launch",

packages/network-contracts/package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
"build": "./build.sh",
2020
"clean": "rm -rf artifacts dist cache coverage typechain deployments .openzeppelin/unknown-31337.json",
2121
"test": "npm run test:fast && npm run test:slow",
22-
"integration-test": "npm run test:dev-chain",
23-
"integration-test-TODO": "npm run test:dev-chain && npm run test:ens-e2e",
24-
"test:dev-chain": "ts-mocha test/integration/contractsSubgraphSmoketest.test.ts",
22+
"integration-test-TODO": "npm run test:ens-e2e",
2523
"test:fast": "hardhat test `find test/hardhat -name '*.test.ts'`",
2624
"test:slow": "hardhat test `find test/hardhat-slow-tests -name '*.test.ts'`",
2725
"test:ens-e2e": "hardhat run --network dev2 test/integration/ens-e2e.test.ts",
@@ -76,7 +74,6 @@
7674
"hardhat-gas-reporter": "1.0.9",
7775
"hardhat-ignore-warnings": "0.2.8",
7876
"solhint": "3.4.1",
79-
"ts-mocha": "10.0.0",
8077
"web3-providers-http": "1.8.0"
8178
}
8279
}

packages/network-subgraphs/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
"clean": "rm -rf build generated abis",
88
"docker:buildLocalArch": "./build.sh dev2 && docker build . -t streamr/deploy-network-subgraphs:dev-fastchain && rm subgraph.yaml",
99
"docker:buildMultiArchAndPush": "./build.sh dev2 && docker buildx build --platform linux/amd64,linux/arm64 . -t streamr/deploy-network-subgraphs:dev-fastchain --push && rm subgraph.yaml",
10+
"smoke-test": "ts-mocha tests/smoke/smoke.test.ts",
1011
"test": "cd ../../ && graph test -d --version 0.5.4",
1112
"coverage": "cd ../../ && graph test -d -- -c"
1213
},
1314
"devDependencies": {
1415
"@graphprotocol/graph-cli": "0.89.0",
16+
"@streamr/config": "^5.8.0",
1517
"handlebars": "4.7.8",
16-
"matchstick-as": "0.5.0"
18+
"matchstick-as": "0.5.0",
19+
"ts-mocha": "10.0.0"
1720
},
1821
"dependencies": {
1922
"@graphprotocol/graph-ts": "0.35.1"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"display": "Node 12",
4+
"compilerOptions": {
5+
"lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
6+
"module": "CommonJS",
7+
"target": "es2019",
8+
"preserveSymlinks": true,
9+
"strict": true,
10+
"esModuleInterop": true,
11+
"skipLibCheck": true,
12+
"forceConsistentCasingInFileNames": true,
13+
"resolveJsonModule": true,
14+
"outDir": "dist"
15+
},
16+
"include": ["./tests"]
17+
}

0 commit comments

Comments
 (0)