From d6096b393be9ded4972c789b0401a549a421e5ba Mon Sep 17 00:00:00 2001 From: Cat Core Date: Mon, 28 Oct 2024 11:01:59 +0100 Subject: [PATCH] Run tests after build --- .github/workflows/build_and_publish.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index e7bbb9c..c1884d1 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -13,13 +13,13 @@ java-version: 17 distribution: temurin - - name: Build with Gradle - run: ./gradlew build + - name: Build + run: ./gradlew build -x test - - name: run test + - name: Test run: ./gradlew test check - - name: sonar + - name: Sonar run: ./gradlew jacocoTestCoverageVerification jacocoTestReport sonar env: SONAR_URL: ${{ secrets.SONAR_URL }} @@ -29,4 +29,13 @@ name: Publish run: ./gradlew build modrinth env: - MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} \ No newline at end of file + MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }} + + - name: Store reports if any + if: failure() + uses: actions/upload-artifact@v4 + with: + name: reports + path: | + **/build/reports/ + **/build/test-results/ \ No newline at end of file