From 4d8d4861e7726208dfd813dfa502e4cbfa1ee8b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=A0o=20Ho=C3=A0ng=20S=C6=A1n?= Date: Mon, 17 Mar 2025 03:50:13 +0700 Subject: [PATCH 1/6] Replace Codecov with SonarCloud --- .github/workflows/flutter.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index 0427b2fc7..3c7dd6a74 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -43,7 +43,7 @@ jobs: with: name: failures path: "**/failures/" - - uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0 - with: - fail_ci_if_error: true - token: ${{ secrets.CODECOV_TOKEN }} + + - uses: SonarSource/sonarqube-scan-action@0303d6b62e310685c0e34d0b9cde218036885c4d # v5.0.0 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 18135d01fba93a2ccead4965a573f31fdc20c8d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=A0o=20Ho=C3=A0ng=20S=C6=A1n?= Date: Mon, 17 Mar 2025 03:51:14 +0700 Subject: [PATCH 2/6] Create sonar-project.properties --- sonar-project.properties | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 000000000..91caa4749 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,2 @@ +sonar.projectKey=daohoangson_flutter_widget_from_html +sonar.organization=daohoangson From 29949fb0ddbe53937e41f3f93eb090a0fbb942a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=A0o=20Ho=C3=A0ng=20S=C6=A1n?= Date: Mon, 17 Mar 2025 04:01:22 +0700 Subject: [PATCH 3/6] Update sonar-project.properties --- sonar-project.properties | 1 + 1 file changed, 1 insertion(+) diff --git a/sonar-project.properties b/sonar-project.properties index 91caa4749..f810c8f7c 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,2 +1,3 @@ sonar.projectKey=daohoangson_flutter_widget_from_html sonar.organization=daohoangson +sonar.sources=packages From 85077a299e273136d335721ed97b6f1f1756f056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=A0o=20Ho=C3=A0ng=20S=C6=A1n?= Date: Mon, 17 Mar 2025 04:13:40 +0700 Subject: [PATCH 4/6] [skip ci] fetch-depth: 0 --- .github/workflows/flutter.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index 3c7dd6a74..cd778c5ac 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -21,8 +21,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: 0 # for SonarCloud + - uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0 if: github.base_ref + - name: Setup Flutter uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff # v2.18.0 with: From 45d9015e97b3cceba245f6f89741625019ab8428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=A0o=20Ho=C3=A0ng=20S=C6=A1n?= Date: Mon, 17 Mar 2025 04:15:53 +0700 Subject: [PATCH 5/6] Configure sonar.dart.lcov.reportPaths --- sonar-project.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sonar-project.properties b/sonar-project.properties index f810c8f7c..156f64af5 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,3 +1,5 @@ sonar.projectKey=daohoangson_flutter_widget_from_html sonar.organization=daohoangson sonar.sources=packages + +sonar.dart.lcov.reportPaths=packages/*/coverage/lcov.info From 72c055b5053c65bb1539415044ff8233ba6f74c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=C3=A0o=20Ho=C3=A0ng=20S=C6=A1n?= Date: Mon, 17 Mar 2025 04:18:40 +0700 Subject: [PATCH 6/6] sonar.test.inclusions --- sonar-project.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonar-project.properties b/sonar-project.properties index 156f64af5..c8c5c1ab8 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1,5 +1,5 @@ +sonar.dart.lcov.reportPaths=packages/*/coverage/lcov.info sonar.projectKey=daohoangson_flutter_widget_from_html sonar.organization=daohoangson sonar.sources=packages - -sonar.dart.lcov.reportPaths=packages/*/coverage/lcov.info +sonar.test.inclusions=**/test/*