From e99cefa79616fbffc237860b056b27ef36072fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Fingen?= Date: Wed, 31 Jan 2024 18:17:49 +0000 Subject: [PATCH] chore: Add harhdat coverage --- .github/workflows/contracts.yml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/contracts.yml b/.github/workflows/contracts.yml index 7b0689a9..4aeb146d 100644 --- a/.github/workflows/contracts.yml +++ b/.github/workflows/contracts.yml @@ -122,4 +122,35 @@ jobs: run: yarn install --frozen-lockfile - name: Test contracts - run: yarn test \ No newline at end of file + run: yarn test + + coverage-hardhat: + name: Hardhat coverage + runs-on: ubuntu-latest + if: ${{ contains(github.event.pull_request.labels.*.name, 'coverage') }} + continue-on-error: true + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v3 + with: + node-version: 16 + cache: yarn + env: + # Workaround for https://github.com/actions/setup-node/issues/317 + FORCE_COLOR: 0 + + - run: yarn install --immutable + + - name: Test contract coverage + run: yarn coverage + continue-on-error: true + env: + NODE_OPTIONS: --max-old-space-size=4096 + + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ./packages/contracts/coverage/lcov.info