From 0198c7ac4cc2005f70cea8834cfe9e917ef1c708 Mon Sep 17 00:00:00 2001 From: Roman Cinis <52065414+tsinis@users.noreply.github.com> Date: Tue, 22 Oct 2024 19:51:39 +0200 Subject: [PATCH 1/7] chore(ci): update verify workflow to use dcm for analysis --- .github/workflows/verify_package_workflow.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/verify_package_workflow.yaml b/.github/workflows/verify_package_workflow.yaml index 160f4508..00e6a9d1 100644 --- a/.github/workflows/verify_package_workflow.yaml +++ b/.github/workflows/verify_package_workflow.yaml @@ -72,12 +72,15 @@ jobs: report: ${{ steps.analysis.outputs.json_output }} min-pub-points: 130 - - name: ๐Ÿ›‚ Set up file system write permissions - run: sudo chown -R runner:runner $(pwd) && sudo chmod -R 777 $(pwd) + - name: ๐Ÿ“ฅ Install DCM + if: ${{ github.event_name == 'pull_request' }} + uses: CQLabs/setup-dcm@v1.1.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} - name: ๐Ÿ”Ž Dart Code Metrics if: ${{ github.event_name == 'pull_request' }} - run: dart run dart_code_linter:metrics --fatal-style --fatal-performance --fatal-warnings -r github lib + run: dcm analyze . - name: ๐Ÿงช Run Dart tests if: ${{ !inputs.is_flutter }} From 44041d2fc2aefdc236fed32e048874e4f8f7baf4 Mon Sep 17 00:00:00 2001 From: Roman Cinis <52065414+tsinis@users.noreply.github.com> Date: Tue, 22 Oct 2024 19:52:00 +0200 Subject: [PATCH 2/7] fix: update hero tag in example's fab --- .../world_countries/example/lib/widgets/floating_button.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/world_countries/example/lib/widgets/floating_button.dart b/packages/world_countries/example/lib/widgets/floating_button.dart index 349d92e9..55f9d687 100644 --- a/packages/world_countries/example/lib/widgets/floating_button.dart +++ b/packages/world_countries/example/lib/widgets/floating_button.dart @@ -14,7 +14,7 @@ class FloatingButton extends StatelessWidget { onLongPress: () => onPressed(isLong: true), // ignore: prefer-action-button-tooltip, we need long-press here. child: FloatingActionButton( - heroTag: "fab", + heroTag: "FAB", onPressed: () => onPressed(isLong: false), child: AnimatedBuilder( animation: controller, From b5fffe1fa96f41cf17c7e02a041112be922ed1af Mon Sep 17 00:00:00 2001 From: Roman Cinis <52065414+tsinis@users.noreply.github.com> Date: Tue, 22 Oct 2024 20:05:53 +0200 Subject: [PATCH 3/7] fix: update print statements for clarity in currencies example --- packages/sealed_currencies/example/lib/main.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/sealed_currencies/example/lib/main.dart b/packages/sealed_currencies/example/lib/main.dart index 7edbfba1..5e173ec3 100644 --- a/packages/sealed_currencies/example/lib/main.dart +++ b/packages/sealed_currencies/example/lib/main.dart @@ -21,9 +21,9 @@ void main() { subunitToUnit: 100, unitFirst: true), translations: eurCurrencyTranslations". */ - print(isVikingKrone(const FiatNok())); // Prints "true". - print(isVikingKrone(serbianDinar)); // Prints "null". - print(isVikingKrone(const FiatCzk())); // Prints "false". + print(isVikingKrone(const FiatNok())); // Prints true. + print(isVikingKrone(serbianDinar)); // Prints null. + print(isVikingKrone(const FiatCzk())); // Prints false. FiatCurrency.list .where((currency) => currency.symbol?.contains("kr") ?? false) From bc78578c085800e9716514b3a53d3e85a8a54887 Mon Sep 17 00:00:00 2001 From: Roman Cinis <52065414+tsinis@users.noreply.github.com> Date: Tue, 22 Oct 2024 20:07:48 +0200 Subject: [PATCH 4/7] fix(ci): adjust permissions for build directory in verify workflow --- .github/workflows/verify_package_workflow.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/verify_package_workflow.yaml b/.github/workflows/verify_package_workflow.yaml index 00e6a9d1..298f7d25 100644 --- a/.github/workflows/verify_package_workflow.yaml +++ b/.github/workflows/verify_package_workflow.yaml @@ -82,6 +82,12 @@ jobs: if: ${{ github.event_name == 'pull_request' }} run: dcm analyze . + - name: ๐Ÿ›‚ Adjust permissions for build directory + run: | + mkdir -p build + sudo chown -R runner:runner build + sudo chmod -R 777 build + - name: ๐Ÿงช Run Dart tests if: ${{ !inputs.is_flutter }} run: | From ca4d3745634ed6024d652f6888a050e042e265b1 Mon Sep 17 00:00:00 2001 From: Roman Cinis <52065414+tsinis@users.noreply.github.com> Date: Tue, 22 Oct 2024 20:11:34 +0200 Subject: [PATCH 5/7] fix(ci): update permissions setup for build directory in verify workflow --- .github/workflows/verify_package_workflow.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/verify_package_workflow.yaml b/.github/workflows/verify_package_workflow.yaml index 298f7d25..0403e5b7 100644 --- a/.github/workflows/verify_package_workflow.yaml +++ b/.github/workflows/verify_package_workflow.yaml @@ -82,11 +82,8 @@ jobs: if: ${{ github.event_name == 'pull_request' }} run: dcm analyze . - - name: ๐Ÿ›‚ Adjust permissions for build directory - run: | - mkdir -p build - sudo chown -R runner:runner build - sudo chmod -R 777 build + - name: ๐Ÿ›‚ Set up file system write permissions + run: sudo chown -R runner:runner $(pwd) && sudo chmod -R 777 $(pwd) - name: ๐Ÿงช Run Dart tests if: ${{ !inputs.is_flutter }} From 0dacaeae33618aabb2b9165d5e95c2a12f8c9d6c Mon Sep 17 00:00:00 2001 From: Roman Cinis <52065414+tsinis@users.noreply.github.com> Date: Tue, 22 Oct 2024 20:14:43 +0200 Subject: [PATCH 6/7] fix(ci): increase minimum pub points requirement in verify workflow --- .github/workflows/verify_package_workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify_package_workflow.yaml b/.github/workflows/verify_package_workflow.yaml index 0403e5b7..673283a3 100644 --- a/.github/workflows/verify_package_workflow.yaml +++ b/.github/workflows/verify_package_workflow.yaml @@ -70,7 +70,7 @@ jobs: uses: fujidaiti/dart-package-inspector@v2.0.4 with: report: ${{ steps.analysis.outputs.json_output }} - min-pub-points: 130 + min-pub-points: 150 - name: ๐Ÿ“ฅ Install DCM if: ${{ github.event_name == 'pull_request' }} From a28cd26fa797e00e054b6321a5e41f17b1cf55b9 Mon Sep 17 00:00:00 2001 From: Roman Cinis <52065414+tsinis@users.noreply.github.com> Date: Tue, 22 Oct 2024 20:21:24 +0200 Subject: [PATCH 7/7] fix(ci): enhance dcm analysis with additional flags --- .github/workflows/verify_package_workflow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify_package_workflow.yaml b/.github/workflows/verify_package_workflow.yaml index 673283a3..b87337de 100644 --- a/.github/workflows/verify_package_workflow.yaml +++ b/.github/workflows/verify_package_workflow.yaml @@ -80,7 +80,7 @@ jobs: - name: ๐Ÿ”Ž Dart Code Metrics if: ${{ github.event_name == 'pull_request' }} - run: dcm analyze . + run: dcm analyze . --congratulate --fatal-style --fatal-warnings --reporter=github - name: ๐Ÿ›‚ Set up file system write permissions run: sudo chown -R runner:runner $(pwd) && sudo chmod -R 777 $(pwd)