Merge branch 'main' of github.com:znsio/specmatic #1912
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Sonarqube Build | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: { fetch-depth: 0 } | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Run coverage report | |
run: ./gradlew codeCoverageReport | |
- name: Run sonar scan | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: ./gradlew --info sonarqube -x test | |
- name: Upload core Gradle Log | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Gradle core Build Log | |
path: core/build/reports/ | |
- name: Upload junit5-support Gradle Log | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Gradle junit5-support Build Log | |
path: junit5-support/build/reports/ | |
- name: Upload application Gradle Log | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Gradle application Build Log | |
path: application/build/reports/ |