Skip to content

Commit

Permalink
Update gradle.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
aNNiMON authored Feb 20, 2024
1 parent c899609 commit b1cfc6b
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,21 @@ on:
pull_request:
branches: [ "latest" ]

env:
GRADLE_CACHE_KEY: ${{ github.run_id }}-gradle-${{ github.run_number }}-${{ github.run_number }}-${{ github.sha }}

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
name: Build & Test
strategy:
matrix:
java: [ '17', '21' ]
name: Test
steps:
- uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
- uses: actions/checkout@v4
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: ${{ matrix.java }}
distribution: 'temurin'

- name: Gradle cache
uses: actions/cache@v3
with:
path: ~/.gradle/caches
key: ${{ env.GRADLE_CACHE_KEY }}
restore-keys: ${{ env.GRADLE_CACHE_KEY }}

- name: Run tests
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
uses: gradle/actions/setup-gradle@v3
with:
arguments: test

0 comments on commit b1cfc6b

Please sign in to comment.