Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Test DCM workflow with bots removed #6635

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,37 @@ jobs:
BOT: main
run: ./tool/bots.sh

dcm:
name: Dart Code Metrics
needs: flutter-prep
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Clone Flutter DevTools
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
with:
ref: "${{ github.event.pull_request.head.sha }}"
- name: Load Cached Flutter SDK
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84
with:
path: |
./flutter-sdk
key: flutter-sdk-${{ runner.os }}-${{ needs.flutter-prep.outputs.latest_flutter_candidate }}
- 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@b64355ae6ca0b5d484f0106a033dd1388965d06d
- name: Run DCM on root
run: |
dcm analyze packages/devtools_app packages/devtools_shared packages/devtools_test

test:
name: ${{ matrix.bot }}
needs: flutter-prep
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/dcm-label.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/dcm.yaml

This file was deleted.

20 changes: 0 additions & 20 deletions .github/workflows/flutter-prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ on:
os-name:
description: 'The OS to run against, either "macos" or "ubuntu". If neither is provided, will run against both.'
type: string
needs-checkout-merge:
description: "Whether the PR should be merged during the checkout step. Necessary for pull_request_target workflows."
type: boolean
requires-label:
description: "Specifies the label required for the workflow to run. If not provided, the workflow will always run."
type: string

outputs:
latest_flutter_candidate:
Expand All @@ -24,8 +18,6 @@ on:

jobs:
reusable-flutter-prep:
# Note: Do not delete the following check. This is needed for the DCM workflow.
if: inputs.requires-label == '' || contains(github.event.pull_request.labels.*.name, inputs.requires-label)
name: ${{ matrix.os }} Flutter Prep
outputs:
latest_flutter_candidate: ${{ steps.flutter-candidate.outputs.FLUTTER_CANDIDATE }}
Expand All @@ -36,19 +28,7 @@ jobs:
steps:
# TODO(https://github.com/flutter/devtools/issues/5729) Consider caching DevTools so that we
# don't check it out again is subsequent workflows.

# Merge in the PR branch during checkout using the PR's sha. This is necessary for pull_request_target
# workflows. See: https://github.com/actions/checkout/issues/518
- name: Checkout PR branch for DevTools
if: ${{ inputs.needs-checkout-merge == true }}
id: checkout-pr-branch
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac
with:
ref: "${{ github.event.pull_request.head.sha }}"

# Otherwise use the default checkout action.
- name: Checkout DevTools (default)
if: steps.checkout-pr-branch.outcome == 'skipped'
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac

- name: Get Latest Flutter Candidate
Expand Down
Loading