diff --git a/.env.test b/.env.test index 1db36739..23f83e86 100644 --- a/.env.test +++ b/.env.test @@ -7,10 +7,10 @@ ADMIN_PASS=password AWS_REGION=us-east-1 AWS_ACCOUNT_ID=902020902029 # KMS_KEY_IDS=17527f1c-a16c-4cb5-8b38-397dd31c6f52 -KMS_KEYS_TAG="Environment=test" +KMS_KEYS_TAG="Environment=Test" # MNEMONIC="myth like bonus scare over problem client lizard pioneer submit female collect" -# MNEMONIC="test test test test test test test test test test test junk" +MNEMONIC="test test test test test test test test test test test junk" NETWORK=dapptest LOG_LEVEL=debug RECAPTCHA_SECRET= diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2e6d4eef..f8d8031a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,12 +48,12 @@ jobs: AWS_REGION: ${{ secrets.AWS_REGION }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - KMS_KEYS_TAG: "Environment=Development" + KMS_KEYS_TAG: "Environment=Test" ADMIN_PASS: test JWT_PASS: test TRAVIS: true NETWORK: dapptest - # MNEMONIC: 'myth like bonus scare over problem client lizard pioneer submit female collect' + MNEMONIC: 'test test test test test test test test test test test junk' ADMIN_MNEMONIC: 'test test test test test test test test test test test junk' ALCHEMY_API: ${{ secrets.ALCHEMY_API }} AWS_SES_ACCESS_KEY: ${{ secrets.AWS_SES_ACCESS_KEY }} @@ -93,12 +93,18 @@ jobs: MNEMONIC: ${{ env.ADMIN_MNEMONIC }} run: | echo "using mnemonic for admin: ${MNEMONIC}" + # Verify blockchain is still running before starting tests (for blockchain chunks) + if echo "$BLOCKCHAIN_CHUNKS" | jq -e "index(${{ matrix.chunk }}) != null" > /dev/null 2>&1; then + echo "Verifying blockchain node before tests..." + curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://localhost:8545 || (echo "Blockchain node not responding before tests!" && exit 1) + fi echo $CHUNKS | jq '.[${{ matrix.chunk }}] | .[] | @text' | xargs npm run coverage # npm run test -- src/server/send/__tests__/sendAPI.js # npm run coverage -- --silent # npm run coveralls npm run build pkill -f ganache || true + pkill -f "node.*runNode" || true - name: Coveralls uses: coverallsapp/github-action@master diff --git a/package-lock.json b/package-lock.json index 1ee9dde8..b82d944a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@babel/runtime": "^7.16.5", "@gooddollar/goodcontracts": "^2.6.1", "@gooddollar/goodprotocol": "^2.1.4", - "@gooddollar/kms-ethereum-signing": "1.0.0", + "@gooddollar/kms-ethereum-signing": "1.0.1", "@openzeppelin/defender-autotask-client": "^1.50.0", "@openzeppelin/defender-relay-client": "^1.49.0", "@sentry/integrations": "^5.30.0", @@ -134,8 +134,8 @@ "webpack-node-externals": "^1.7.2" }, "engines": { - "node": ">=20.x <25", - "npm": ">=9.x" + "node": "20.20.0", + "npm": "10.8.2" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -9065,15 +9065,13 @@ }, "node_modules/@gooddollar/goodprotocol": { "version": "2.1.4", - "resolved": "https://registry.npmjs.org/@gooddollar/goodprotocol/-/goodprotocol-2.1.4.tgz", - "integrity": "sha512-vu9WPrVmzmsvOKFoLH4/U92HWbXkms7F2keA9s457T++wf85sQE6fbaw5f3x6NroYQ2HPnJvav76f4cgXgKW2A==", "license": "MIT", "engines": { "node": ">=16.x" } }, "node_modules/@gooddollar/kms-ethereum-signing": { - "version": "1.0.0", + "version": "1.0.1", "license": "MIT", "dependencies": { "@aws-sdk/client-kms": "^3.490.0", diff --git a/package.json b/package.json index 28989083..f98ee1b5 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,8 @@ "description": "GoodDollar Server", "main": "src/server/index.js", "engines": { - "node": ">=20.x <25", - "npm": ">=9.x" + "node": "20.20.0", + "npm": "10.8.2" }, "scripts": { "build": "webpack --mode production --config webpack.server.config.js", @@ -56,7 +56,7 @@ "@babel/polyfill": "^7.11.5", "@babel/runtime": "^7.16.5", "@gooddollar/goodcontracts": "^2.6.1", - "@gooddollar/kms-ethereum-signing": "1.0.0", + "@gooddollar/kms-ethereum-signing": "1.0.1", "@gooddollar/goodprotocol": "^2.1.4", "@openzeppelin/defender-autotask-client": "^1.50.0", "@openzeppelin/defender-relay-client": "^1.49.0",