Skip to content

Commit

Permalink
Replace cache: gradle with "odern" gradle-build-action (JabRef#10657)
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor authored and yuyan-z committed Nov 25, 2023
1 parent a587359 commit 5a5b611
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deployment-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Clean up keychain
run: |
security delete-keychain signing_temp.keychain ${{runner.temp}}/keychain/notarization.keychain || true
Expand All @@ -85,6 +84,8 @@ jobs:
mkdir ${{runner.temp}}/keychain
security create-keychain -p jabref ${{runner.temp}}/keychain/notarization.keychain
security set-keychain-settings ${{runner.temp}}/keychain/notarization.keychain
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Prepare merged jars and modules dir (macOS)
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" prepareModulesDir
- name: Build dmg (macOS)
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Prepare merged jars and modules dir (macOS)
if: (matrix.os == 'macos-latest') || (steps.checksecrets.outputs.secretspresent == 'NO')
run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" prepareModulesDir
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/refresh-journal-lists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Check whether journal-list.mv can be generated (the "real" generation is done inside JabRef's build process)
run: |
./gradlew generateJournalListMV
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests-fetchers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run fetcher tests
run: ./gradlew fetcherTest
env:
Expand Down
21 changes: 14 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Run checkstyle reporter
uses: nikitasavinov/checkstyle-action@master
with:
reporter: github-pr-review
github_token: ${{ secrets.GITHUB_TOKEN }}
checkstyle_config: 'config/checkstyle/checkstyle_reviewdog.xml'
checkstyle_version: '10.3'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run checkstyle using gradle
run: ./gradlew checkstyleMain checkstyleTest checkstyleJmh
openrewrite:
Expand All @@ -63,7 +64,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run OpenRewrite
run: |
./gradlew rewriteDryRun
Expand All @@ -81,7 +83,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run modernizer
run: |
# enable failing of this task if modernizer complains
Expand Down Expand Up @@ -162,7 +165,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run tests
run: xvfb-run --auto-servernum ./gradlew check -x checkstyleJmh -x checkstyleMain -x checkstyleTest -x modernizer
env:
Expand Down Expand Up @@ -197,7 +201,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run tests on PostgreSQL
run: ./gradlew databaseTest --rerun-tasks
env:
Expand Down Expand Up @@ -234,7 +239,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Run GUI tests
run: xvfb-run --auto-servernum ./gradlew guiTest
env:
Expand Down Expand Up @@ -278,7 +284,8 @@ jobs:
with:
java-version: 21.0.1
distribution: 'liberica'
cache: 'gradle'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Update test coverage metrics
if: (github.ref == 'refs/heads/main') && (steps.checksecrets.outputs.secretspresent == 'YES')
run: xvfb-run --auto-servernum ./gradlew jacocoTestReport
Expand Down

0 comments on commit 5a5b611

Please sign in to comment.