Merge pull request #139 from renovate-bot/renovate/antora-cli-3.x #305
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
name: Verify source code changes | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ '11' ] | |
name: Verify source code changes on Java ${{ matrix.Java }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get changed source files or maven poms of all modules | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v39 | |
with: | |
files: | | |
pom.xml | |
.mvn/** | |
.github/workflows/verify.yml | |
plantuml-generator-util/pom.xml | |
plantuml-generator-util/src/main/** | |
plantuml-generator-util/src/test/** | |
plantuml-generator-maven-plugin/pom.xml | |
plantuml-generator-maven-plugin/src/main/** | |
plantuml-generator-maven-plugin/src/test/** | |
plantuml-generator-maven-plugin/src/it/** | |
- name: Set up JDK | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
cache: 'maven' | |
- name: Analyze with SonarCloud | |
if: ${{steps.changed-files-specific.outputs.any_changed == 'true' && github.event_name != 'pull_request'}} | |
run: ./mvnw -B install verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.coverage.jacoco.xmlReportPaths=\${project.build.directory}/site/jacoco/jacoco.xml -Dsonar.projectKey=devlauer_plantuml-generator -Dsonar.login=$SONAR_TOKEN | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Verify via Maven without SonarCloud | |
if: ${{steps.changed-files-specific.outputs.any_changed == 'true' && github.event_name == 'pull_request'}} | |
run: ./mvnw -B install verify | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |