From 5a7662a86f8680f3f4b42ce20f84df4347516cec Mon Sep 17 00:00:00 2001 From: "anatoly.shipitz" Date: Thu, 17 Apr 2025 12:52:40 +0200 Subject: [PATCH 1/3] Refactor code quality workflow to separate linting and SonarQube jobs Changes: - Introduced a new SonarQube job for code analysis --- .github/workflows/code-quality.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index d7c8e80..853d13c 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -8,10 +8,23 @@ on: - main jobs: - test: + lint: runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Lint + run: echo "Linting..." + + sonarqube: + name: SonarQube + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Lint - run: echo "Linting..." \ No newline at end of file + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarQube Scan + uses: SonarSource/sonarqube-scan-action@v5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file From 046b093d1a86f0313122e911c5b3265c0183c560 Mon Sep 17 00:00:00 2001 From: "anatoly.shipitz" Date: Thu, 17 Apr 2025 12:56:41 +0200 Subject: [PATCH 2/3] Fix formatting in code quality workflow file by adding a newline at the end of the file --- .github/workflows/code-quality.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 853d13c..933c2ae 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -27,4 +27,4 @@ jobs: - name: SonarQube Scan uses: SonarSource/sonarqube-scan-action@v5 env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} From 4d2218ea17542cf5403c43bc4a0e8aeadfd82686 Mon Sep 17 00:00:00 2001 From: "anatoly.shipitz" Date: Thu, 17 Apr 2025 13:02:54 +0200 Subject: [PATCH 3/3] Add SonarQube configuration for project automation - Created sonar-project.properties file - Set project key and organization for SonarQube integration --- 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 0000000..11053b4 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,2 @@ +sonar.projectKey=speedandfunction_automatization +sonar.organization=speedandfunction