Compare commits
No commits in common. "v1.12.3" and "v1.12.2" have entirely different histories.
3 changed files with 6 additions and 60 deletions
|
@ -4,31 +4,8 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
changed_files:
|
|
||||||
name: Get Changed Files
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
backend: ${{ steps.filter.outputs.backend }}
|
|
||||||
frontend: ${{ steps.filter.outputs.frontend }}
|
|
||||||
workflow: ${{ steps.filter.outputs.workflow }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Check for file changes
|
|
||||||
uses: dorny/paths-filter@v2
|
|
||||||
id: filter
|
|
||||||
with:
|
|
||||||
filters: |
|
|
||||||
backend:
|
|
||||||
- 'backend/**'
|
|
||||||
frontend:
|
|
||||||
- 'frontend/**'
|
|
||||||
workflow:
|
|
||||||
- '.gitea/workflows/**'
|
|
||||||
|
|
||||||
checkstyle:
|
checkstyle:
|
||||||
name: "Checkstyle Main"
|
name: "Checkstyle Main"
|
||||||
needs: changed_files
|
|
||||||
if: ${{ needs.changed_files.outputs.backend == 'true' || needs.changed_files.outputs.workflow == 'true' }}
|
|
||||||
container:
|
container:
|
||||||
image: "cimg/openjdk:23.0-node"
|
image: "cimg/openjdk:23.0-node"
|
||||||
steps:
|
steps:
|
||||||
|
@ -40,43 +17,21 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
~/.gradle/wrapper
|
~/.gradle/wrapper
|
||||||
backend/build/reports/checkstyle
|
key: gradle-${{ runner.os }}-common
|
||||||
key: gradle-${{ runner.os }}-${{ hashFiles('backend/**/*.java', 'backend/config/checkstyle/checkstyle.xml') }}
|
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
gradle-${{ runner.os }}-
|
gradle-${{ runner.os }}-
|
||||||
- name: "Check cache for checkstyle reports"
|
- name: "Prepare Gradle"
|
||||||
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: |
|
run: gradle clean
|
||||||
gradle checkstyleMain
|
- name: "Check"
|
||||||
|
working-directory: ./backend
|
||||||
- name: "Cache checkstyle results"
|
run: gradle checkstyleMain
|
||||||
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
|
||||||
|
|
||||||
eslint:
|
eslint:
|
||||||
name: eslint
|
name: eslint
|
||||||
needs: changed_files
|
|
||||||
if: ${{ needs.changed_files.outputs.frontend == 'true' || needs.changed_files.outputs.workflow == 'true' }}
|
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -103,8 +58,6 @@ jobs:
|
||||||
|
|
||||||
prettier:
|
prettier:
|
||||||
name: prettier
|
name: prettier
|
||||||
needs: changed_files
|
|
||||||
if: ${{ needs.changed_files.outputs.frontend == 'true' || needs.changed_files.outputs.workflow == 'true' }}
|
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -131,8 +84,6 @@ jobs:
|
||||||
|
|
||||||
test-build:
|
test-build:
|
||||||
name: test-build
|
name: test-build
|
||||||
needs: changed_files
|
|
||||||
if: ${{ needs.changed_files.outputs.frontend == 'true' || needs.changed_files.outputs.workflow == 'true' }}
|
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-latest
|
image: catthehacker/ubuntu:act-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -3,11 +3,6 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
paths:
|
|
||||||
- 'backend/**'
|
|
||||||
- 'frontend/**'
|
|
||||||
- '.gitea/workflows/release.yml'
|
|
||||||
- 'release.config.cjs'
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue