From ce535fdca681e51d8248ab48c7144d02544df3f7 Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 16 Dec 2024 02:45:36 +0100 Subject: [PATCH] Add test job to commit workflow --- .forgejo/workflows/commit.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.forgejo/workflows/commit.yml b/.forgejo/workflows/commit.yml index eabe425..7ef7ce1 100644 --- a/.forgejo/workflows/commit.yml +++ b/.forgejo/workflows/commit.yml @@ -39,6 +39,33 @@ jobs: path: | **/build/libs/*.jar if-no-files-found: error + test: + runs-on: docker + container: + image: git.staropensource.de/infrastructure/actions-docker:java + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@v4 + - name: Restore Gradle cache + uses: actions/cache/restore@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + gradle-${{ runner.os }}- + - name: Run tests + run: ./gradlew --no-daemon -Pjava.skipToolchainSpecification=true test + - name: Save Gradle cache + uses: actions/cache/save@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + gradle-${{ runner.os }}- build-apidoc: runs-on: docker container: