# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: JDK-EA Unit Tests

on: [push, pull_request]

jobs:
  applications:
    name: Unit Test EA
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        java-version: [18]

    runs-on: ${{ matrix.os }}

    steps:
      - name: Git Checkout
        uses: actions/checkout@v3
      - name: Download JDK ${{ matrix.java-version }} from jdk.java.net
        uses: oracle-actions/setup-java@v1
        id: download-jdk
        with:
          website: jdk.java.net
          release: ${{ matrix.java-version }}
      - name: 'Print outputs'
        shell: bash
        run: |
          echo 'Outputs'
          echo "steps.download-jdk.outputs.archive = ${{ steps.download-jdk.outputs.archive }}"
          echo "steps.download-jdk.outputs.version = ${{ steps.download-jdk.outputs.version }}"
      - name: Set Maven Wrapper
        run: mvn -N io.takari:maven:0.7.7:wrapper -Dmaven=3.6.3
      - name: 'JDK Version'
        run: java --version
      - name: Unit-Test
        run: ./mvnw verify -pl '!p2-repository,!org.eclipse.collections:org.eclipse.collections' --no-transfer-progress
        env:
          MAVEN_OPTS: "-Xmx2g"
