50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
name: Push Validation
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
validate:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up JDK 15
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'liberica'
|
|
java-version: '15'
|
|
cache: 'gradle'
|
|
- name: Build
|
|
run: ./gradlew jar
|
|
- name: Test
|
|
env:
|
|
JAVA_TOOL_OPTIONS: -Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.verbose=true
|
|
run: ./gradlew test
|
|
- uses: actions/upload-artifact@v3
|
|
if: failure()
|
|
with:
|
|
name: test-report
|
|
path: build/reports/tests/test/
|
|
- name: Upload Test Report
|
|
uses: check-run-reporter/action@v2.11.1
|
|
# always run, otherwise you'll only see results for passing builds
|
|
if: always()
|
|
with:
|
|
label: test
|
|
token: ${{ secrets.CHECK_RUN_REPORTER_TOKEN }}
|
|
report: 'build/test-results/**/*.xml'
|
|
- name: Static Code Analysis
|
|
run: ./gradlew check -x test
|
|
- name: Upload Checkstyle Report
|
|
uses: check-run-reporter/action@v2.11.1
|
|
# always run, otherwise you'll only see results for passing builds
|
|
if: always()
|
|
with:
|
|
label: code-analysis
|
|
token: ${{ secrets.CHECK_RUN_REPORTER_TOKEN }}
|
|
report: 'build/reports/**/*.xml'
|