Skip to content

Commit

Permalink
fix coverage src mapping (#1035)
Browse files Browse the repository at this point in the history
* fix test coverage src mapping

* fix

* log before err

* fix

* cleanup

This reverts commit ffa2602.

* Revert "cleanup"

This reverts commit f435d34.

* fix

* fix

* try upload directly without merging

* cleanup
  • Loading branch information
shunjizhan authored Oct 10, 2024
1 parent bc8cd35 commit 4cf0691
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 24 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,8 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: merge coverage reports
run: yarn merge-coverage

- name: upload merged coverage report
# does not need to merge, as upload action will auto upload all and merge
- name: upload all coverage report and auto merge
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
"test": "vitest run",
"test:watch": "vitest",
"bump": "yarn workspaces foreach -vit --include '@acala-network/*' --exclude '@acala-network/evm-subql' version",
"postinstall": "husky install",
"merge-coverage": "./scripts/merge-coverage.sh"
"postinstall": "husky install"
},
"devDependencies": {
"@swc/core": "^1.3.56",
Expand Down
3 changes: 1 addition & 2 deletions packages/eth-rpc-adapter/.nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
"include": ["*/src/**/*.ts"],
"exclude": ["**/*.test.ts", "**/__tests__/", "**/evm-subql/**"],
"reporter": ["html", "text", "lcov", "json"],
"instrument": true,
"require": ["ts-node/register"]
"instrument": true
}
4 changes: 3 additions & 1 deletion packages/eth-rpc-adapter/scripts/health-check.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

HEALTH_CHECK_URL="http://localhost:8545"
MAX_ATTEMPTS=60
MAX_ATTEMPTS=30
INTERVAL=1

attempt=0
Expand All @@ -26,5 +26,7 @@ while [ $attempt -lt $MAX_ATTEMPTS ]; do
attempt=$((attempt+1))
done

pm2 logs eth-rpc

echo "❌ eth rpc failed to start in $MAX_ATTEMPTS seconds"
exit 1
15 changes: 0 additions & 15 deletions scripts/merge-coverage.sh

This file was deleted.

3 changes: 3 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"resolveJsonModule": true,
"baseUrl": ".",
"composite": true,
"sourceMap": true,
"inlineSourceMap": false,
"inlineSources": true,
"paths": {
"@acala-network/bodhi": ["packages/bodhi/src"],
"@acala-network/bodhi/*": ["packages/bodhi/src/*"],
Expand Down

0 comments on commit 4cf0691

Please sign in to comment.