From 5a62e3ed84ff723a732d0a4320e03cdede2349ee Mon Sep 17 00:00:00 2001 From: Andrei Solntsev Date: Mon, 23 Jan 2023 09:16:47 +0200 Subject: [PATCH] update github actions versions + trigger only one build for every PR --- .github/workflows/test.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index da4329b..fd0e31d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,22 +2,27 @@ name: Run tests on: push: branches: - - '*' + - main pull_request: branches: - - '*' + jobs: run-tests-job: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + uses: actions/checkout@v3 + - name: Set up JDK + uses: actions/setup-java@v3 with: + distribution: 'temurin' + cache: 'gradle' java-version: '11' - - name: Run tests in Gradle - run: ./gradlew clean check --info --rerun-tasks - - uses: actions/upload-artifact@v2 + - name: Build + run: ./gradlew clean build -x test + - name: Run tests + run: ./gradlew check --info + - uses: actions/upload-artifact@v3 if: failure() with: name: test-report