ci: update CI workflows to include path filters #73

Merged
jank merged 4 commits from pipeline-rules into main 2025-03-13 09:04:46 +00:00
Showing only changes of commit 0227146da7 - Show all commits

View file

@ -40,16 +40,36 @@ jobs:
path: | path: |
~/.gradle/caches ~/.gradle/caches
~/.gradle/wrapper ~/.gradle/wrapper
key: gradle-${{ runner.os }}-common backend/build/reports/checkstyle
key: gradle-${{ runner.os }}-${{ hashFiles('backend/**/*.java', 'backend/config/checkstyle/checkstyle.xml') }}
restore-keys: | restore-keys: |
gradle-${{ runner.os }}- gradle-${{ runner.os }}-
- name: "Prepare Gradle" - name: "Check cache for checkstyle reports"
id: check-cache
run: |
if [ -d "backend/build/reports/checkstyle" ] && [ -f "backend/build/reports/checkstyle/main.xml" ]; then
echo "Cache hit! Using cached checkstyle results"
echo "cache-hit=true" >> $GITHUB_OUTPUT
else
echo "Cache miss! Running checkstyle check"
echo "cache-hit=false" >> $GITHUB_OUTPUT
fi
- name: "Run checkstyle"
if: steps.check-cache.outputs.cache-hit != 'true'
working-directory: ./backend working-directory: ./backend
run: gradle clean run: |
- name: "Check" gradle checkstyleMain
working-directory: ./backend
run: gradle checkstyleMain - name: "Cache checkstyle results"
if: steps.check-cache.outputs.cache-hit != 'true'
uses: actions/upload-artifact@v4
with:
name: checkstyle-results
path: backend/build/reports/checkstyle
- name: "Stop Gradle" - name: "Stop Gradle"
if: steps.check-cache.outputs.cache-hit != 'true'
working-directory: ./backend working-directory: ./backend
run: gradle --stop run: gradle --stop