From 0a56e4a9a0a04788f8a70edf75caa5cdd67217bc Mon Sep 17 00:00:00 2001 From: zufar-sunagatov Date: Fri, 20 Oct 2023 16:20:33 +0100 Subject: [PATCH] added a space for test pipeline --- .github/workflows/ci-cd-pipeline.yaml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-cd-pipeline.yaml b/.github/workflows/ci-cd-pipeline.yaml index e9f1b45a..e4c633c0 100644 --- a/.github/workflows/ci-cd-pipeline.yaml +++ b/.github/workflows/ci-cd-pipeline.yaml @@ -27,10 +27,24 @@ jobs: distribution: 'temurin' cache: 'maven' - - name: Run unit tests - run: mvn test -Pdev --file pom.xml - - name: Build with Maven run: mvn -B package -Pdev --file pom.xml + # Static code analysis with SonarScanner + + - name: Install SonarScanner + run: | + wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.7.0.2747-linux.zip + unzip sonar-scanner-cli-4.7.0.2747-linux.zip + export SONAR_SCANNER_HOME=`pwd`/sonar-scanner-4.7.0.2747-linux + export PATH=$SONAR_SCANNER_HOME/bin:$PATH + + - name: Run SonarScanner + run: | + sonar-scanner \ + -Dsonar.projectKey=your-project-key \ + -Dsonar.sources=. \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.login=your-sonarcloud-token +