You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
DCM Action
v1.0.7
dcm-action
runs DCM checks in GitHub Actions.
name: DCM
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dart and Flutter
uses: subosito/flutter-action@v2
- name: Install dependencies
run: dart pub get
- name: Install DCM
uses: CQLabs/setup-dcm@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Run DCM
uses: CQLabs/dcm-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
ci_key: ${{ secrets.DCM_CI_KEY }}
email: ${{ secrets.DCM_EMAIL }}
folders: lib
The action takes the following inputs:
Name | Required | Description | Default |
---|---|---|---|
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_pat | Required if you had private GitHub repository in the package dependencies | Personal access token must access to repo and read:user scopes | |
ci_key | ☑️ | License key to run on CI server. | |
☑️ | Email used to purchase the license. | ||
folders | ☑️ | List of folders and files (separated by commas) to scan. | [lib ] |
pull_request_comment | Publish report overview directly into your pull request. | true |
|
pull_request_comment_on_fail | Publish report overview directly into your pull request only when any DCM check fails. Note, when this option is enabled, pull_request_comment needs to be explicitly set to false . |
false |
|
package_name | Package name to differentiate the report. Set when running several DCM runs at once. | ||
fatal_performance | Treat performance level issues as fatal. | true |
|
fatal_style | Treat style level issues as fatal. | true |
|
fatal_warnings | Treat warning level issues as fatal. | true |
If you have a DCM Open Source license, pass oss
to both CI key and email inputs.
See the LICENSE file.
Please see our CHANGELOG.md file.