From 9be8590c76b3f58e8c19bad82fb0be9524aee1b3 Mon Sep 17 00:00:00 2001 From: Sergey Morgunov Date: Thu, 10 Aug 2023 13:12:39 +0300 Subject: [PATCH] Use GHA to check pull requests --- .github/workflows/build-test.yml | 66 ++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/build-test.yml diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml new file mode 100644 index 0000000..0cd9cf0 --- /dev/null +++ b/.github/workflows/build-test.yml @@ -0,0 +1,66 @@ +name: Check + +on: + pull_request: # Check Pull Requests + + push: + branches: + - master # Check branch after merge + +concurrency: + # Only run once for latest commit per ref and cancel other (previous) runs. + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + # Run Gradle Wrapper Validation to verify the wrapper's checksum + gradle-validation: + name: Gradle Wrapper + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + # we don't know what commit the last tag was + fetch-depth: 0 + + - name: Gradle Wrapper Validation + uses: gradle/wrapper-validation-action@v1 + + check: + name: Check for Scala ${{ matrix.scala }} + runs-on: ubuntu-latest + needs: gradle-validation + strategy: + matrix: + include: + - scala: "2.11" + lagom: "1.4.15" + - scala: "2.12" + lagom: "1.5.5" + - scala: "2.13" + lagom: "1.6.4" + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + # we don't know what commit the last tag was + fetch-depth: 0 + + - uses: actions/setup-java@v3 + with: + distribution: 'liberica' + java-version: '8' + check-latest: true + cache: 'gradle' + + - name: Check + run: >- + ./gradlew --no-daemon clean check + -PscalaBinaryVersion=${{ matrix.scala }} -PlagomVersion=${{ matrix.lagom }} + + finish: + name: Finish + needs: # Should be last + - "check" + uses: taymyr/.github/.github/workflows/rtm.yml@v1