From 1de48e2056e231ea99aacb8e18fb3df795802e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Liberoff=20V=C3=A1zquez?= Date: Mon, 4 Dec 2023 18:17:06 +0100 Subject: [PATCH 1/6] =?UTF-8?q?Updated=20`main.yml`=20GitHub=20Actions=20w?= =?UTF-8?q?orkflow=20to=20trigger=20from=20`main`=20branch=20and=20also=20?= =?UTF-8?q?when=20a=20Pull=20Request=20is=20synchronized=20or=20changed=20?= =?UTF-8?q?from=20=C2=ABDraft=C2=BB=20to=20=C2=ABReady=20for=20Review?= =?UTF-8?q?=C2=BB.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 787e6e0..d27481a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,16 +3,20 @@ name: ENMARCHA NuGet on: push: branches: - - releases/** + - releases/** + - main paths-ignore: - - '/**/*.md' - - '.github/**/*' + - '/**/*.md' + - '.github/**/*' pull_request: types: - opened - reopened + - synchronize + - ready_for_review branches: - - releases/** + - releases/** + - main workflow_dispatch: env: @@ -86,7 +90,7 @@ jobs: CD: runs-on: ubuntu-latest needs: CI - if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/heads/releases') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/heads/releases') || github.ref == 'refs/head/main') steps: - name: Checkout code uses: actions/checkout@v4 From b4ebb4a7023e8535e0202acd97e88756dfc4ef08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Liberoff=20V=C3=A1zquez?= Date: Mon, 4 Dec 2023 18:26:10 +0100 Subject: [PATCH 2/6] Removed `/s:$GITHUB_WORKSPACE/SonarQube.Analysis.xml` to fix main GitHub Actions workflow. --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d27481a..525fb1f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: dotnet-sonarscanner begin /k:"${{ secrets.SONAR_PROJECT_KEY }}" /o:"${{ secrets.SONAR_ORGANIZATION }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.exclusions="**/tst/**/*" /d:sonar.cs.opencover.reportsPaths="**/tst/**/coverage.opencover.xml" /s:$GITHUB_WORKSPACE/SonarQube.Analysis.xml + # run: dotnet-sonarscanner begin /k:"${{ secrets.SONAR_PROJECT_KEY }}" /o:"${{ secrets.SONAR_ORGANIZATION }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.exclusions="**/tst/**/*" /d:sonar.cs.opencover.reportsPaths="**/tst/**/coverage.opencover.xml" /s:$GITHUB_WORKSPACE/SonarQube.Analysis.xml + run: dotnet-sonarscanner begin /k:"${{ secrets.SONAR_PROJECT_KEY }}" /o:"${{ secrets.SONAR_ORGANIZATION }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.exclusions="**/tst/**/*" /d:sonar.cs.opencover.reportsPaths="**/tst/**/coverage.opencover.xml" - name: Test run: dotnet test --nologo --no-restore --collect:"XPlat Code Coverage" --configuration ${{env.BuildConfiguration}} --settings coverlet.runsettings From 8315f9953a104c65ad6c70efce1452dcca879e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Liberoff=20V=C3=A1zquez?= Date: Mon, 4 Dec 2023 18:39:16 +0100 Subject: [PATCH 3/6] Added `--version 5.15.0` to ` Sonar - Install SonarCloud scanners` --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 525fb1f..b1013a7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,7 @@ jobs: run: dotnet restore --configfile NuGet.config --verbosity Minimal - name: Sonar - Install SonarCloud scanners - run: dotnet tool install --global dotnet-sonarscanner + run: dotnet tool install --global dotnet-sonarscanner --version 5.15.0 - name: Sonar - Begin Analyze env: From a991955d0cf2945441ca9daf9318cdeb02c20c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Liberoff=20V=C3=A1zquez?= Date: Mon, 4 Dec 2023 18:43:10 +0100 Subject: [PATCH 4/6] Set `--version 6.0.0` in `Sonar - Install SonarCloud scanners` --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1013a7..f755de4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,7 @@ jobs: run: dotnet restore --configfile NuGet.config --verbosity Minimal - name: Sonar - Install SonarCloud scanners - run: dotnet tool install --global dotnet-sonarscanner --version 5.15.0 + run: dotnet tool install --global dotnet-sonarscanner --version 6.0.0 - name: Sonar - Begin Analyze env: From e8f0b3e3c5e7402a4a6744ae762764e9e0af0357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Liberoff=20V=C3=A1zquez?= Date: Mon, 4 Dec 2023 18:54:55 +0100 Subject: [PATCH 5/6] Revert to version `5.15.0` in `Sonar - Install SonarCloud scanners` --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f755de4..b1013a7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,7 +40,7 @@ jobs: run: dotnet restore --configfile NuGet.config --verbosity Minimal - name: Sonar - Install SonarCloud scanners - run: dotnet tool install --global dotnet-sonarscanner --version 6.0.0 + run: dotnet tool install --global dotnet-sonarscanner --version 5.15.0 - name: Sonar - Begin Analyze env: From c7dec2bf35dd8a738b635c2d299883fccf2e78e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Liberoff=20V=C3=A1zquez?= Date: Mon, 4 Dec 2023 18:57:00 +0100 Subject: [PATCH 6/6] Removed comment. --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1013a7..62ee626 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,6 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - # run: dotnet-sonarscanner begin /k:"${{ secrets.SONAR_PROJECT_KEY }}" /o:"${{ secrets.SONAR_ORGANIZATION }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.exclusions="**/tst/**/*" /d:sonar.cs.opencover.reportsPaths="**/tst/**/coverage.opencover.xml" /s:$GITHUB_WORKSPACE/SonarQube.Analysis.xml run: dotnet-sonarscanner begin /k:"${{ secrets.SONAR_PROJECT_KEY }}" /o:"${{ secrets.SONAR_ORGANIZATION }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.exclusions="**/tst/**/*" /d:sonar.cs.opencover.reportsPaths="**/tst/**/coverage.opencover.xml" - name: Test