name: Pull Request

on:
  pull_request:

env:
  JAVA_DIST: 'zulu'
  JAVA_VERSION: 22

defaults:
  run:
    shell: bash

jobs: 
  test:
    name: Compile and Test
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          distribution: ${{ env.JAVA_DIST }}
          java-version: ${{ env.JAVA_VERSION }}
          cache: 'maven'
      - name: Build and Test
        run: xvfb-run mvn -B clean install jacoco:report -Pcoverage -Djavafx.platform=linux