From f95bea08440b326f1a51fd108e1455e66cd2e346 Mon Sep 17 00:00:00 2001 From: Geo <72315006+geo-tp@users.noreply.github.com> Date: Wed, 13 Nov 2024 00:13:35 +0100 Subject: [PATCH] Add Jacoco report artifact to CI --- .github/workflows/CI.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8440f73..34b8d86 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,9 +31,16 @@ jobs: sudo apt-get install mysql-client mysql -u root -proot -e "CREATE DATABASE IF NOT EXISTS autocrud;" - # Run tests - - name: Run tests with Maven - run: mvn -B test --file pom.xml + # Run tests and generate Jacoco coverage report + - name: Run tests with Maven and generate coverage report + run: mvn test jacoco:report + + # Upload coverage report as an artifact + - name: Upload coverage report + uses: actions/upload-artifact@v3 + with: + name: coverage-report + path: target/site/jacoco/index.html build: runs-on: ubuntu-latest