Skip to main content

GitHub Action

Flutterando Metrics GitHub Action allows you to integrate Flutterando Metrics into your CI/CD process and get code quality reports inside PR's.

Usage

Create flutterandometrics.yaml under .github/workflows with the following content (the default configuration listed):

flutterandometrics.yaml
name: Flutterando Metrics

on: [push]

jobs:
check:
name: flutterando_metrics-action

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: flutterando_metrics
uses: Flutterando/flutterando_metrics-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

Inputs

Inputs

NameRequiredDescriptionDefault
github_token☑️Required to post a report on GitHub. Note: the secret GITHUB_TOKEN is already provided by GitHub and you don't have to set it up yourself.
github_patRequired if you had private GitHub repository in the package dependenciesPersonal access token must access to repo and read:user scopes
foldersList of folders whose contents will be scanned.[lib]
relative_pathIf your package isn't at the root of the repository, set this input to indicate its location.
pull_request_commentPublish detailed report commented directly into your pull request.false
analyze_report_title_patternConfigurable analyze report title pattern.Flutterando Metrics analyze report of $packageName
fatal_warningsTreat warning level issues as fatal.false
fatal_performanceTreat performance level issues as fatal.false
fatal_styleTreat style level issues as fatal.false
check_unused_filesAdditional scan for find unused files in package.false
check_unused_files_foldersList of folders whose contents will be scanned for find unused files.Taken from folders argument
unused_files_report_title_patternConfigurable unused files report title pattern.Flutterando Metrics unused files report of $packageName

Output example

Analysis result

Analysis result example

Annotation

Annotation example