Debug coverage #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Coverage Check | |
| on: | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Print environment versions | |
| run: | | |
| echo "Node.js: $(node -v)" | |
| echo "NPM: $(npm -v)" | |
| npx hardhat --version | |
| npx solcjs --version 2>/dev/null || echo "(will be downloaded by Hardhat if needed)" | |
| - name: Setup environment variables | |
| run: | | |
| cp .env.example .env | |
| echo "Fork block numbers configured:" | |
| grep "FORK_BLOCK_NUMBER" .env || echo " (none found)" | |
| - name: Run coverage and verify | |
| run: | | |
| set -e | |
| echo "Running coverage..." | |
| npm run coverage | |
| echo "Verifying coverage against baseline..." | |
| npm run coverage:check | |
| - name: Upload coverage report (optional) | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: coverage/ |