try to only run push, when not in sage pr #370
Workflow file for this run
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 Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
permissions: | |
checks: write | |
contents: read | |
pull-requests: write | |
security-events: read | |
statuses: read | |
on: | |
push: | |
branches-ignore: [ "main" ] | |
pull_request_target: | |
types: [assigned, opened, synchronize, reopened, labeled] | |
branches: [ "main"] | |
jobs: | |
build: | |
name: build eclipse-ignore-helper plugin | |
runs-on: ubuntu-latest | |
if: contains(github.event_name, 'push') && !contains(github.event.pull_request.labels.*.name, 'safe to test') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK (8 and 11) | |
uses: actions/setup-java@v3 | |
with: | |
java-version: | | |
8 | |
11 | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: mvn -B verify -ntp --file pom.xml | |
- name: Run PITest Maven | |
run: mvn -B -Ppit-test verify -ntp --file pom.xml | |
- name: Run Integration Tests | |
run: mvn -B -Prun-its verify -ntp --file pom.xml | |
- name: Publish Test Report | |
if: ${{ always() }} | |
uses: scacap/action-surefire-report@v1 | |
env: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Analyze with SonarCloud.io | |
env: | |
JAVA_HOME: ${{ env.JAVA_HOME_11_X64 }} | |
run: mvn -ntp -B org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.token=${{ secrets.SONAR_TOKEN }} |