name: test pull_request on: pull_request: paths: - src/** - pom.xml jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.2.0 - name: Set up Java and Maven uses: actions/setup-java@v2 with: java-version: '8'
distribution: 'zulu'
- name: Cache m2 package uses: actions/cache@v2 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('pom.xml') }} restore-keys: | ${{ runner.os }}-maven- - run: mvn test