Merge pull request #223 from red6/dependabot/maven/org.apache.maven.p… #728
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: Java CI | |
on: | |
push: | |
branches: | |
- master | |
- 'release/*' | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
pull_request_target: | |
types: [ opened, synchronize, reopened ] | |
jobs: | |
build-dmn-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Disabling shallow clone is recommended for improving relevancy of reporting | |
- name: Set up JDK 1.11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
cache: maven | |
- name: Build with Maven | |
run: mvn clean install -P checkerframework | |
sonarcloud: | |
runs-on: ubuntu-latest | |
# If the PR is coming from a fork (pull_request_target), ensure it's opened by "dependabot[bot]". | |
# Otherwise, clone it normally. | |
if: | | |
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') || | |
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') | |
steps: | |
- name: Checkout | |
if: ${{ github.event_name != 'pull_request_target' }} | |
uses: actions/checkout@v3 | |
- name: Checkout PR | |
if: ${{ github.event_name == 'pull_request_target' }} | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: mvn -B verify jacoco:report org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=red6_dmn-check | |
build-gradle-plugin: | |
runs-on: ubuntu-latest | |
needs: build-dmn-check | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 1.11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
cache: maven | |
- name: Build with Gradle | |
run: cd gradle-plugin && ./gradlew build |