Skip to content

Add a server endpoint for serving devtools extensions #665

Add a server endpoint for serving devtools extensions

Add a server endpoint for serving devtools extensions #665

Workflow file for this run

# A CI workflow to run the Dart Code Metrics analyzer (https://dcm.dev).
# NOTE: DCM usage in DevTools is currently experimental!
# The DCM_CI_KEY and DCM_EMAIL secrets are set in the admin settings page
# of the flutter/devtools repo. They can be found at: go/dash-devexp-dcm-keys
# These are associated with a trial license of DCM, and will need to be changed
# if we decide to purchase an actual license. The trial license will expire on
# April 11, 2024.
# If you want to install and run DCM locally, please refer to CONTRIBUTING.md
# for instructions.
name: Dart Code Metrics
on:
pull_request_target:
# labeled and unlabeled are required along with open to re-run
# workflow when the run-dcm-workflow label is added or removed.
types: [opened, labeled, unlabeled]
branches:
- master
paths:
- "**/*.dart"
- "!packages/devtools_app/lib/devtools.dart"
jobs:
flutter-prep:
uses: ./.github/workflows/flutter-prep.yaml
with:
os-name: ubuntu
requires-label: "run-dcm-workflow"
needs-checkout-merge: true
dcm:
if: contains(github.event.pull_request.labels.*.name, 'run-dcm-workflow')
name: Dart Code Metrics
needs: flutter-prep
runs-on: ubuntu-latest
steps:
- name: Clone Flutter DevTools
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
with:
ref: "${{ github.event.pull_request.head.sha }}"
- name: Load Cached Flutter SDK
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: |
./flutter-sdk
key: flutter-sdk-${{ runner.os }}-${{ needs.flutter-prep.outputs.latest_flutter_candidate }}
- name: Run tool/bots.sh
run: ./tool/bots.sh
- name: Install DCM
run: |
sudo apt-get update
wget -qO- https://dcm.dev/pgp-key.public | sudo gpg --dearmor -o /usr/share/keyrings/dcm.gpg
echo 'deb [signed-by=/usr/share/keyrings/dcm.gpg arch=amd64] https://dcm.dev/debian stable main' | sudo tee /etc/apt/sources.list.d/dart_stable.list
sudo apt-get update
sudo apt-get install dcm
sudo chmod +x /usr/bin/dcm
- name: Setup Dart SDK
uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f
- name: Run DCM on root
run: |
dcm analyze --ci-key="${{ secrets.DCM_CI_KEY }}" --email="${{ secrets.DCM_EMAIL }}" packages/devtools_app packages/devtools_shared packages/devtools_test