Skip to content

Merge pull request #227 from red6/dependabot/github_actions/dessant/l… #731

Merge pull request #227 from red6/dependabot/github_actions/dessant/l…

Merge pull request #227 from red6/dependabot/github_actions/dessant/l… #731

Workflow file for this run

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