From dc57591a5010d72d4e2f1484dc56b505955a69f4 Mon Sep 17 00:00:00 2001 From: MuazzamChaud <92021581+MuazzamChaud@users.noreply.github.com> Date: Tue, 13 Sep 2022 09:14:36 +0100 Subject: [PATCH 1/4] Create sonarcloudtest.yaml --- .github/workflows/sonarcloudtest.yaml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/sonarcloudtest.yaml diff --git a/.github/workflows/sonarcloudtest.yaml b/.github/workflows/sonarcloudtest.yaml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflows/sonarcloudtest.yaml @@ -0,0 +1 @@ + From 4bf6cc9691367b8a1ee9cd0f31050e3e2b8c6d1e Mon Sep 17 00:00:00 2001 From: MuazzamChaud <92021581+MuazzamChaud@users.noreply.github.com> Date: Tue, 13 Sep 2022 09:17:27 +0100 Subject: [PATCH 2/4] Update sonarcloudtest.yaml --- .github/workflows/sonarcloudtest.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sonarcloudtest.yaml b/.github/workflows/sonarcloudtest.yaml index 8b13789..82bd213 100644 --- a/.github/workflows/sonarcloudtest.yaml +++ b/.github/workflows/sonarcloudtest.yaml @@ -1 +1,20 @@ - +name: Build +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From cbf65c36807d220092f7dfc6b53614b62fd310bd Mon Sep 17 00:00:00 2001 From: MuazzamChaud <92021581+MuazzamChaud@users.noreply.github.com> Date: Tue, 13 Sep 2022 09:20:40 +0100 Subject: [PATCH 3/4] Update sonarcloudtest.yaml --- .github/workflows/sonarcloudtest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarcloudtest.yaml b/.github/workflows/sonarcloudtest.yaml index 82bd213..333cf1a 100644 --- a/.github/workflows/sonarcloudtest.yaml +++ b/.github/workflows/sonarcloudtest.yaml @@ -1,4 +1,4 @@ -name: Build +name: sonarcloudtest on: push: branches: From 99842d614cdb543ec693f8806db28d91d2a75e90 Mon Sep 17 00:00:00 2001 From: MuazzamChaud <92021581+MuazzamChaud@users.noreply.github.com> Date: Tue, 13 Sep 2022 09:21:31 +0100 Subject: [PATCH 4/4] Create sonar-project.properties --- sonar-project.properties | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..5588e39 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,12 @@ +sonar.projectKey=MuazzamChaud_.github-workflows +sonar.organization=muazzamchaud + +# This is the name and version displayed in the SonarCloud UI. +#sonar.projectName=.github-workflows +#sonar.projectVersion=1.0 + +# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. +#sonar.sources=. + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8