Skip to content

Commit 0036a6a

Browse files
author
Jegors Cemisovs
committed
Split build and sonarqube, continue on sonarqube failure
1 parent 30cc4a7 commit 0036a6a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ jobs:
3030
path: ~/.gradle/caches
3131
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
3232
restore-keys: ${{ runner.os }}-gradle
33-
- name: Build and analyze
33+
- name: Build and Test
34+
run: ./gradlew build --info
35+
36+
- name: SonarQube Analysis
3437
env:
3538
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
3639
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3740
run: |
3841
if [ -n "$SONAR_TOKEN" ]; then
39-
./gradlew build sonarqube --info
42+
./gradlew sonarqube --info
4043
else
41-
./gradlew build --info
44+
echo "SONAR_TOKEN is not set. Skipping analysis."
4245
fi
46+
continue-on-error: true

0 commit comments

Comments
 (0)