name: Java CI on: [push, pull_request] jobs: build: runs-on: ubuntu-20.04 strategy: matrix: java: [ 11, 15, 16 ] name: JDK ${{ matrix.java }} steps: - uses: actions/checkout@v2 - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v1 with: java-version: ${{ matrix.java }} - name: Cache Maven modules uses: actions/cache@v2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - name: Cache NPM modules uses: actions/cache@v2 env: cache-name: cache-npm-modules with: path: ~/.npm key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- - name: Run tests run: mvn package - uses: mikepenz/action-junit-report@v2 with: report_paths: '**/target/surefire-reports/TEST-*.xml' github_token: ${{ secrets.GITHUB_TOKEN }}