# Automatically build, run unit and integration tests to detect errors early (CI provided by GitHub) # including making pull requests review easier # Human-readable name in the actions tab name: Maven Build # Build on every pull request regardless of the branch # Wiki: https://help.github.com/en/actions/reference/events-that-trigger-workflows on: push: branches: - main pull_request: branches: - main jobs: # job id build_and_test: # Environment image - always use the newest OS runs-on: ubuntu-latest permissions: contents: read # Run steps steps: # Pull changes - uses: actions/checkout@v3 # Setup Java - name: Set up JDK uses: actions/setup-java@v3 with: distribution: 'temurin' java-version: 19 cache: 'maven' # Build and test (included in package) - name: Build with Maven and test # Run non-interactive, package (with compile+test), # ignore snapshot updates, because they are likely to have breaking changes, enforce checksums run: mvn test --batch-mode --threads 2.0C --no-snapshot-updates --strict-checksums --file pom.xml