diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index b0b2c79..a19b587 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -4,31 +4,8 @@ on: pull_request: 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: name: "Checkstyle Main" - needs: changed_files - if: ${{ needs.changed_files.outputs.backend == 'true' || needs.changed_files.outputs.workflow == 'true' }} container: image: "cimg/openjdk:23.0-node" steps: @@ -40,43 +17,21 @@ jobs: path: | ~/.gradle/caches ~/.gradle/wrapper - backend/build/reports/checkstyle - key: gradle-${{ runner.os }}-${{ hashFiles('backend/**/*.java', 'backend/config/checkstyle/checkstyle.xml') }} + key: gradle-${{ runner.os }}-common restore-keys: | gradle-${{ runner.os }}- - - 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' + - name: "Prepare Gradle" 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 - + run: gradle clean + - name: "Check" + working-directory: ./backend + run: gradle checkstyleMain - name: "Stop Gradle" - if: steps.check-cache.outputs.cache-hit != 'true' working-directory: ./backend run: gradle --stop eslint: name: eslint - needs: changed_files - if: ${{ needs.changed_files.outputs.frontend == 'true' || needs.changed_files.outputs.workflow == 'true' }} container: image: catthehacker/ubuntu:act-latest steps: @@ -103,8 +58,6 @@ jobs: prettier: name: prettier - needs: changed_files - if: ${{ needs.changed_files.outputs.frontend == 'true' || needs.changed_files.outputs.workflow == 'true' }} container: image: catthehacker/ubuntu:act-latest steps: @@ -131,8 +84,6 @@ jobs: test-build: name: test-build - needs: changed_files - if: ${{ needs.changed_files.outputs.frontend == 'true' || needs.changed_files.outputs.workflow == 'true' }} container: image: catthehacker/ubuntu:act-latest steps: diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index ab95401..596c53d 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -3,11 +3,6 @@ on: push: branches: - "main" - paths: - - 'backend/**' - - 'frontend/**' - - '.gitea/workflows/release.yml' - - 'release.config.cjs' env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} diff --git a/backend/a b/backend/a deleted file mode 100644 index e69de29..0000000