test-pr.yml 583 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
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'
18
          distribution: 'zulu'
19 20 21 22 23 24 25 26
      - 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