Skip to content

Commit

Permalink
Update gradle actions
Browse files Browse the repository at this point in the history
  • Loading branch information
DrewCarlson committed Oct 29, 2024
1 parent a65e3a5 commit 54ea2ae
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 32 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,16 @@ jobs:
distribution: 'zulu'
java-version: 11

- uses: gradle/actions/setup-gradle@v4
- name: Cache Build files
uses: actions/cache@v4
with:
path: |
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}

- uses: gradle/gradle-build-action@v3
name: Check spotless/ktlint rules
with:
arguments: spotlessCheck
- name: Check spotless/ktlint rules
run: ./gradlew spotlessCheck

api-check:
runs-on: ubuntu-latest
Expand All @@ -60,14 +59,13 @@ jobs:
distribution: 'zulu'
java-version: 11

- uses: gradle/actions/setup-gradle@v4
- name: Cache Build files
uses: actions/cache@v4
with:
path: |
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}

- uses: gradle/gradle-build-action@v3
name: Check public api compatibility
with:
arguments: apiCheck
- name: Check public api compatibility
run: ./gradlew apiCheck
15 changes: 7 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
distribution: 'zulu'
java-version: 11

- uses: gradle/actions/setup-gradle@v4
- name: Cache Build files
uses: actions/cache@v4
with:
Expand All @@ -51,10 +52,8 @@ jobs:
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}

- uses: gradle/gradle-build-action@v3
name: Publish
with:
arguments: clean publishAllPublicationsToMavenCentralRepository
- name: Publish
run: ./gradlew clean publishAllPublicationsToMavenCentralRepository

publish-docs:
name: Publish KDoc to Github Pages
Expand All @@ -67,6 +66,8 @@ jobs:
distribution: 'zulu'
java-version: 11

- uses: gradle/actions/setup-gradle@v4

- name: Cache Build files
uses: actions/cache@v4
with:
Expand All @@ -75,10 +76,8 @@ jobs:
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}

- uses: gradle/gradle-build-action@v3
name: Build Docs
with:
arguments: clean dokkaHtml
- name: Build Docs
run: ./gradlew clean dokkaHtml

- name: Publish Docs
uses: JamesIves/[email protected]
Expand Down
27 changes: 11 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
with:
distribution: 'zulu'
java-version: 11

- uses: gradle/actions/setup-gradle@v4

- name: Cache Build files
uses: actions/cache@v4
with:
Expand All @@ -28,28 +31,20 @@ jobs:
%USERPROFILE%\.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}

- uses: gradle/gradle-build-action@v3
name: Test Windows Target
- name: Test Windows Target
if: ${{ startsWith(matrix.os, 'windows') }}
with:
arguments: windowsTest
run: ./gradlew windowsTest

- uses: gradle/gradle-build-action@v3
name: Test Apple Targets
- name: Test Apple Targets
if: ${{ startsWith(matrix.os, 'macos') }}
with:
arguments: macosX64Test
run: ./gradlew macosX64Test

- uses: gradle/gradle-build-action@v3
name: Test Linux Target
- name: Test Linux Target
if: ${{ startsWith(matrix.os, 'ubuntu') }}
with:
arguments: linuxX64Test
run: ./gradlew linuxX64Test

- uses: gradle/gradle-build-action@v3
name: Test JVM Target
with:
arguments: jvmTest
- name: Test JVM Target
run: ./gradlew jvmTest

- name: Publish Test Reports
uses: mikepenz/action-junit-report@v4
Expand Down

0 comments on commit 54ea2ae

Please sign in to comment.