From 2195d512a4c8e0cae9a4a2529e25e4e7289ff45f Mon Sep 17 00:00:00 2001 From: Ford Date: Thu, 16 Jun 2022 12:25:26 -0700 Subject: [PATCH] workflows/ci: Use CI specific testing commands --- .github/workflows/ci.yml | 2 +- package.json | 1 + packages/indexer-agent/package.json | 3 ++- packages/indexer-cli/package.json | 3 ++- packages/indexer-common/package.json | 3 ++- packages/indexer-common/src/indexer-management/allocations.ts | 1 + packages/indexer-native/package.json | 3 ++- packages/indexer-service/package.json | 3 ++- 8 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d11d85e40..8833ac861 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: - run: yarn install --frozen-lockfile env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - run: yarn test + - run: yarn test:ci env: POSTGRES_TEST_HOST: localhost POSTGRES_TEST_DATABASE: indexer_tests diff --git a/package.json b/package.json index 652b33b55..de9527ab9 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "prepare": "lerna run prepare", "release": "./scripts/release.sh", "test": "lerna --concurrency 1 run test --stream --ignore @graphprotocol/indexer-service", + "test:ci": "lerna --concurrency 1 run test:ci --stream --ignore @graphprotocol/indexer-service", "update-common-ts": "./scripts/update-common-ts.sh 1.8.3", "clean": "rm -rf ./node_modules && lerna run clean", "compile": "lerna run compile" diff --git a/packages/indexer-agent/package.json b/packages/indexer-agent/package.json index 9f5d5b9f5..c063c73b2 100644 --- a/packages/indexer-agent/package.json +++ b/packages/indexer-agent/package.json @@ -17,7 +17,8 @@ "compile": "tsc", "prepare": "yarn format && yarn lint && yarn compile", "start": "node ./dist/index.js start", - "test": "jest --runInBand --detectOpenHandles --passWithNoTests --verbose", + "test": "jest --colors --verbose", + "test:ci": "jest --verbose --ci", "clean": "rm -rf ./node_modules ./dist ./tsconfig.tsbuildinfo", "migrator:pending": "node src/db/cli/migrator pending", "migrator:executed": "node src/db/cli/migrator executed", diff --git a/packages/indexer-cli/package.json b/packages/indexer-cli/package.json index b47ff6081..ec50d01bc 100644 --- a/packages/indexer-cli/package.json +++ b/packages/indexer-cli/package.json @@ -20,7 +20,8 @@ "prepare": "yarn format && yarn lint && yarn compile", "disputes": "yarn prepare && ./dist/cli.js indexer disputes get", "clean": "rm -rf ./node_modules ./dist ./tsconfig.tsbuildinfo", - "test": "jest --colors --verbose --detectOpenHandles", + "test": "jest --colors --verbose --runInBand", + "test:ci": "jest --verbose --runInBand --ci", "test:debug": "LOG_LEVEL=debug jest --runInBand --detectOpenHandles --verbose --forceExit", "test:watch": "jest --watch --detectOpenHandles --verbose" }, diff --git a/packages/indexer-common/package.json b/packages/indexer-common/package.json index f88d6a124..c7db6dfa3 100644 --- a/packages/indexer-common/package.json +++ b/packages/indexer-common/package.json @@ -15,7 +15,8 @@ "lint": "eslint . --ext .ts,.tsx --fix", "compile": "tsc", "prepare": "yarn format && yarn lint && yarn compile", - "test": "jest --runInBand --detectOpenHandles --forceExit", + "test": "jest --colors --verbose --forceExit --runInBand", + "test:ci": "jest --verbose --runInBand --forceExit --ci", "test:watch": "jest --runInBand --detectOpenHandles --watch --passWithNoTests --verbose", "clean": "rm -rf ./node_modules ./dist ./tsconfig.tsbuildinfo" }, diff --git a/packages/indexer-common/src/indexer-management/allocations.ts b/packages/indexer-common/src/indexer-management/allocations.ts index fc86beb90..3c95cf11b 100644 --- a/packages/indexer-common/src/indexer-management/allocations.ts +++ b/packages/indexer-common/src/indexer-management/allocations.ts @@ -29,6 +29,7 @@ import { uniqueAllocationID, upsertIndexingRule, } from '@graphprotocol/indexer-common' + import { BigNumber, BigNumberish, diff --git a/packages/indexer-native/package.json b/packages/indexer-native/package.json index bbd5bfbb1..95154f8fe 100644 --- a/packages/indexer-native/package.json +++ b/packages/indexer-native/package.json @@ -41,7 +41,8 @@ "lint": "eslint .", "prepare": "yarn format && yarn lint", "install": "yarn pull-or-build", - "test": "jest --detectOpenHandles --verbose", + "test": "jest --colors --verbose --forceExit", + "test:ci": "jest --verbose --ci", "clean": "rm -rf ./node_modules ./binary ./build ./coverage ./native/target ./native/artifacts.json ./native/index.node" }, "dependencies": { diff --git a/packages/indexer-service/package.json b/packages/indexer-service/package.json index c9a165db2..12eebaef3 100644 --- a/packages/indexer-service/package.json +++ b/packages/indexer-service/package.json @@ -17,7 +17,8 @@ "compile": "tsc", "prepare": "yarn format && yarn lint && yarn compile", "start": "node ./dist/index.js start", - "test": "jest --passWithNoTests --detectOpenHandles --verbose --forceExit", + "test": "jest --colors --verbose --forceExit", + "test:ci": "jest --verbose --forceExit --ci", "test:watch": "jest --watch --passWithNoTests --detectOpenHandles --verbose", "clean": "rm -rf ./node_modules ./dist ./tsconfig.tsbuildinfo" },