Skip to content

Commit

Permalink
rm hh coverage (#12614)
Browse files Browse the repository at this point in the history
* rm hh coverage

* rm import
  • Loading branch information
RensR authored Mar 27, 2024
1 parent d44abe3 commit 93ff878
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 456 deletions.
66 changes: 0 additions & 66 deletions .github/workflows/solidity-hardhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,72 +56,6 @@ jobs:
this-job-name: Split Solidity Tests
continue-on-error: true

solidity-coverage-splits:
needs: [changes, split-tests]
if: needs.changes.outputs.changes == 'true'
name: Solidity Coverage ${{ matrix.split.id }} ${{ fromJSON('["(skipped)", ""]')[needs.changes.outputs.changes == 'true'] }}
strategy:
fail-fast: false
matrix:
split: ${{ fromJson(needs.split-tests.outputs.splits) }}
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
- name: Setup Hardhat
uses: ./.github/actions/setup-hardhat
with:
namespace: coverage
- name: Run coverage
env:
SPLIT: ${{ matrix.split.coverageTests }}
shell: bash
run: pnpm coverage --testfiles "$SPLIT"
working-directory: contracts
- name: Push coverage
run: ./tools/bin/codecov -f ./contracts/coverage.json
- name: Rename coverage
run: mv ./contracts/coverage.json ./contracts/coverage-${{ matrix.split.idx }}.json
- name: Upload coverage
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: solidity-coverage-${{ matrix.split.idx }}
path: ./contracts/coverage-${{ matrix.split.idx }}.json
- name: Collect Metrics
id: collect-gha-metrics
uses: smartcontractkit/push-gha-metrics-action@0281b09807758be1dcc41651e44e62b353808c47 # v2.1.0
with:
org-id: ${{ secrets.GRAFANA_INTERNAL_TENANT_ID }}
basic-auth: ${{ secrets.GRAFANA_INTERNAL_BASIC_AUTH }}
hostname: ${{ secrets.GRAFANA_INTERNAL_HOST }}
this-job-name: Solidity Coverage ${{ matrix.split.id }}
continue-on-error: true

solidity-coverage:
needs: [changes, solidity-coverage-splits]
if: needs.changes.outputs.changes == 'true'
name: Solidity Coverage ${{ fromJSON('["(skipped)", ""]')[needs.changes.outputs.changes == 'true'] }}
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
- name: Make coverage directory
run: mkdir ./contracts/coverage-reports
- name: Download coverage
uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
with:
path: ./contracts/coverage-reports
- name: Display structure of downloaded files
run: ls -R coverage-reports
working-directory: contracts
- name: Generate merged report
run: pnpm istanbul report text text-summary
working-directory: contracts

solidity-splits:
needs: [changes, split-tests]
if: needs.changes.outputs.changes == 'true'
Expand Down
5 changes: 5 additions & 0 deletions contracts/.changeset/loud-donuts-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@chainlink/contracts": patch
---

rm hh coverage
34 changes: 0 additions & 34 deletions contracts/.solcover.js

This file was deleted.

1 change: 0 additions & 1 deletion contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import '@typechain/hardhat'
import 'hardhat-abi-exporter'
import 'hardhat-contract-sizer'
import 'hardhat-gas-reporter'
import 'solidity-coverage'
import 'hardhat-ignore-warnings'
import { subtask } from 'hardhat/config'
import { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } from 'hardhat/builtin-tasks/task-names'
Expand Down
2 changes: 0 additions & 2 deletions contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,13 @@
"hardhat-contract-sizer": "^2.10.0",
"hardhat-gas-reporter": "^1.0.9",
"hardhat-ignore-warnings": "^0.2.6",
"istanbul": "^0.4.5",
"moment": "^2.29.4",
"prettier": "^3.2.5",
"prettier-plugin-solidity": "1.3.1",
"rlp": "^2.2.7",
"solhint": "^4.5.2",
"solhint-plugin-chainlink-solidity": "git+https://github.com/smartcontractkit/chainlink-solhint-rules.git#v1.2.1",
"solhint-plugin-prettier": "^0.1.0",
"solidity-coverage": "^0.8.5",
"ts-node": "^10.9.2",
"typechain": "^8.2.1",
"typescript": "^5.4.3"
Expand Down
Loading

0 comments on commit 93ff878

Please sign in to comment.