diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 88ac1a1..2ad3b1a 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -1,5 +1,4 @@ -name: Java CI with Maven - +name: tests on: push: branches: @@ -7,22 +6,22 @@ on: pull_request: branches: - main - + - development jobs: - build: - + run_tests: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 1.8 - uses: actions/setup-java@v2 + - name: Checkout the repository + uses: actions/checkout@v2 + - name: Set up JDK 8 + uses: actions/setup-java@v1 with: - java-version: '1.8' - - - name: Build with Maven - run: mvn -B clean package --file pom.xml - - - name: Run tests - run: mvn test --file pom.xml + java-version: 8 + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Run tests with Maven + run: mvn -B test --file pom.xml \ No newline at end of file