Merge pull request #5391 from vector-im/michaelk/sonaqube_nightly

Run sonarqube as part of nightly build
This commit is contained in:
Michael Kaye 2022-03-04 09:25:18 +00:00 committed by GitHub
commit d4bf38f428
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 4 deletions

View File

@ -14,7 +14,6 @@ env:
-Porg.gradle.jvmargs=-Xmx4g
-Porg.gradle.parallel=false
-PallWarningsAsErrors=false
jobs:
# Build Android Tests [Matrix SDK]
build-android-test-matrix-sdk:
@ -263,8 +262,6 @@ jobs:
# No concurrency required, runs every time on a schedule.
steps:
- uses: actions/checkout@v2
with:
ref: develop
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
@ -311,12 +308,43 @@ jobs:
emulator.log
failure_screenshots/
sonarqube:
runs-on: macos-latest
if: always()
needs:
- integration-tests
- ui-tests
# - unit-tests TODO: code coverage from here too
- build-android-test-matrix-sdk
- build-android-test-app
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- run: ./gradlew sonarqube $CI_GRADLE_ARG_PROPERTIES
env:
ORG_GRADLE_PROJECT_SONAR_LOGIN: ${{ secrets.SONAR_TOKEN }}
# Notify the channel about scheduled runs, do not notify for manually triggered runs
notify:
runs-on: ubuntu-latest
needs:
- integration-tests
- ui-tests
# - unit-tests
- build-android-test-matrix-sdk
- build-android-test-app
- sonarqube
if: always() && github.event_name != 'workflow_dispatch'
# No concurrency required, runs every time on a schedule.
steps:

View File

@ -109,7 +109,7 @@ apply plugin: 'org.sonarqube'
// To run a sonar analysis:
// Run './gradlew sonarqube -Dsonar.login=<REPLACE_WITH_SONAR_KEY>'
// The SONAR_KEY is stored in passbolt
// The SONAR_KEY is stored in passbolt as Token Sonar Cloud Bma
sonarqube {
properties {