name: CI on: push: branches: - master pull_request: branches: - '*' jobs: build: name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up JDK 11 uses: actions/setup-java@v1 with: java-version: 11 java-package: jdk+fx server-id: dt_repository server-username: MAVEN_USERNAME server-password: MAVEN_CENTRAL_TOKEN - name: Cache maven repo uses: actions/cache@v1 if: github.event_name == 'push' || github.event_name == 'pull_request' with: path: ~/.m2/repository key: ${{ runner.os }}-maven-latest-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('targets/latest/latest.target') }} restore-keys: | ${{ runner.os }}-maven-latest- - name: Build with Maven env: MAVEN_USERNAME: ${{ secrets.P2_USER }} MAVEN_CENTRAL_TOKEN: ${{ secrets.P2_TOKEN }} working-directory: ./ run: | Xvfb :5 -screen 0 1280x1024x8 -fbdir /tmp & export DISPLAY=:5 mvn clean verify -PSDK,find-bugs -Dtycho.localArtifacts=ignore -B -V - name: Publish Test Report uses: scacap/action-surefire-report@v1 if: always() with: github_token: ${{ secrets.GITHUB_TOKEN }} - name: Upload repo uses: actions/upload-artifact@v2 with: name: v8-code-style-repository path: repositories/com.e1c.v8codestyle.repository/target/repository/ - name: Upload SDK repo uses: actions/upload-artifact@v2 with: name: v8-code-style-repository-sdk path: repositories/com.e1c.v8codestyle.repository.sdk/target/repository/ - name: Upload JaCoCo exec data uses: actions/upload-artifact@v2 if: always() with: name: jacoco path: | ./**/target/jacoco.exec ./**/target/site/jacoco*/ - name: Upload test logs on failure uses: actions/upload-artifact@v2 if: failure() with: name: logs path: ./**/.log