diff --git a/.github/workflows/job-sonarcloud.yml b/.github/workflows/job-sonarcloud.yml index 52319b643..eecbfe5c1 100644 --- a/.github/workflows/job-sonarcloud.yml +++ b/.github/workflows/job-sonarcloud.yml @@ -11,7 +11,12 @@ jobs: runs-on: ubuntu-latest container: symless/synergy-core:debian10 - + + env: + SONAR_SCANNER_VERSION: 4.4.0.2170 + SONAR_SCANNER_HOME: "~/sonar/sonar-scanner-${SONAR_SCANNER_VERSION}-linux" + SONAR_SCANNER_OPTS: "-server" + steps: - uses: actions/checkout@v2 with: @@ -26,7 +31,6 @@ jobs: pip install gcovr - name: Installing Sonar Scanner run: | - export SONAR_SCANNER_VERSION=4.4.0.2170 export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/ @@ -35,27 +39,24 @@ jobs: run: | curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/ - export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH - name: Build run: | export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH - mkdir build-release cd build-release cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_COVERAGE=ON .. . ./version - build-wrapper-linux-x86-64 --out-dir bw-output make -j - ./bin/unittests - echo "hmm" + - name: Running coverage + run: | + cd build-release make coverage - name: Run Sonar run: | export PATH=$SONAR_SCANNER_HOME/bin:$PATH - export SONAR_SCANNER_OPTS="-server" cd build-release sonar-scanner \ -Dsonar.organization=symless \