From 399f55a481ee6bf8977bb713b811732f864b4af3 Mon Sep 17 00:00:00 2001 From: Daniil Marchenko Date: Tue, 30 Jan 2024 19:47:54 +0200 Subject: [PATCH] update CI/CD DCM action --- .github/workflows/code_check.yaml | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/.github/workflows/code_check.yaml b/.github/workflows/code_check.yaml index fcb5809..4530b5f 100644 --- a/.github/workflows/code_check.yaml +++ b/.github/workflows/code_check.yaml @@ -23,24 +23,14 @@ jobs: - name: Get dependencies run: flutter pub get - - name: Setup Dart Code Metrics - run: dart pub get dart_code_metrics + - name: Dart Code Metrics + uses: solid-software/dart-code-metrics-action@bb6c6b9b92f6adbd2b77fd83747a85f1f1be17ca + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + fatal_warnings: true + fatal_style: true + folders: "lib" - - name: Run Dart Code Metrics - run: | - dirs_to_analyze="" - if [ -d lib ]; then dirs_to_analyze+=" lib"; fi - if [ -d test ]; then dirs_to_analyze+=" test"; fi - if [ -d example ]; then dirs_to_analyze+=" example"; fi - if [ dirs_to_analyze != "" ] - then - dart run dart_code_metrics:metrics \ - analyze \ - $dirs_to_analyze \ - --fatal-warnings \ - --fatal-performance \ - --fatal-style - fi - name: Check formatting run: dart format . --set-exit-if-changed