Skip to content

Commit

Permalink
Reintroduce cache in gha, add separate PR action
Browse files Browse the repository at this point in the history
  • Loading branch information
williewillus committed Jun 9, 2023
1 parent 95be21e commit 612a902
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
env:
SIGNING_KEY: ${{ secrets.VIOLET_MOON_SIGNING_KEY }}
run: echo "${SIGNING_KEY}" | gpg --import -
# - name: Cache
# uses: actions/cache@v2
# with:
# path: |
# ~/.gradle/caches
# key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle', '**/gradle-wrapper.properties') }}
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle', '**/gradle-wrapper.properties') }}
- name: Build with Gradle
run: ./gradlew pmdMain spotlessJavaCheck build
- name: PMD report
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Pull Request CI

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Validate gradlew integrity
uses: gradle/wrapper-validation-action@v1
- name: Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle', '**/gradle-wrapper.properties') }}
- name: Build with Gradle
run: ./gradlew pmdMain spotlessJavaCheck build
- name: PMD report
uses: jwgmeligmeyling/pmd-github-action@v1
if: failure()
with:
path: '**/reports/pmd/main.xml'
- name: Cleanup
run: ./gradlew --stop

0 comments on commit 612a902

Please sign in to comment.