Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tintinweb/solidity-metrics-action
📊 Generates Solidity Code Metrics Reports for Solidity Source Units in your Repository.
https://github.com/tintinweb/solidity-metrics-action
github-action solidity
Last synced: 3 months ago
JSON representation
📊 Generates Solidity Code Metrics Reports for Solidity Source Units in your Repository.
- Host: GitHub
- URL: https://github.com/tintinweb/solidity-metrics-action
- Owner: tintinweb
- Created: 2022-07-16T19:40:00.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-18T08:38:44.000Z (over 2 years ago)
- Last Synced: 2024-10-10T17:21:10.904Z (3 months ago)
- Topics: github-action, solidity
- Language: Dockerfile
- Homepage: https://github.com/marketplace/actions/solidity-metrics-action
- Size: 832 KB
- Stars: 10
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://diligence.consensys.net)
[[ 🌐 ](https://diligence.consensys.net) [ 📩 ](https://github.com/ConsenSys/vscode-solidity-metrics/blob/master/mailto:[email protected]) [ 🔥 ](https://consensys.github.io/diligence/)]# Solidity Metrics GitHub Action
Generate a Solidity Code Metrics HTML-Report for your Project.
Powered by solidity-code-metrics.[Sample Report (html)](./sample/__metrics.html)
## Usage
Include it in your GitHub Actions file after a checkout.
```yaml
- name: 📊 Crunch Numbers
uses: tintinweb/solidity-metrics-action@v1
id: metrics
with:
target: '{,**/}*.sol'
```Generates a HTML metrics report in the workspace root. The path can be accessed via `${{ steps.metrics.outputs.report }}` (by default: `__metrics.html`).
## Example Job
1. Checkout the codebase
2. Generate the Metrics report (Note: `id: ` allows us to access the generated report with `${{ steps..outputs.report }}`).
3. Upload `${{ steps..outputs.report }}` as an artifact to the jobThe `target` argument takes a single glob to select input files. By default it will try to load any `*.sol` file in the root or sub-paths (i.e. `{,**/}*.sol`).
```yaml
name: Metricson:
pull_request:
branches: [ master ]jobs:
metrics:
name: 📊 Code Metrics
runs-on: ubuntu-latest
steps:
- name: Setup
uses: actions/checkout@v3
- name: 📊 Crunch Numbers
uses: tintinweb/solidity-metrics-action@v1
id: metrics
with:
target: '{,**/}*.sol'
- uses: actions/upload-artifact@v3
with:
name: metrics.html
path: ${{ steps.metrics.outputs.report }}
```