From b0d4ca27946f4b378dffe2e6c7787f41c0e83483 Mon Sep 17 00:00:00 2001 From: Chrystian Melo Date: Fri, 14 Jun 2024 10:42:04 -0300 Subject: [PATCH 1/4] Update pom.xml --- pom.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/pom.xml b/pom.xml index eb8fcd9..2caba96 100644 --- a/pom.xml +++ b/pom.xml @@ -52,6 +52,7 @@ 21 + org.apache.maven.plugins maven-surefire-plugin @@ -62,6 +63,47 @@ + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 21 + 21 + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + **/*Test.java + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + + + prepare-agent + + + + report + verify + + report + + + + From 6193b2c99f830fe5dc3b8561d227420516da2647 Mon Sep 17 00:00:00 2001 From: Chrystian Melo Date: Fri, 14 Jun 2024 10:43:08 -0300 Subject: [PATCH 2/4] Update maven.yml --- .github/workflows/maven.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 46d34ef..a1d20bb 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -36,7 +36,10 @@ jobs: ${{ runner.os }}-maven- - name: Install dependencies and run tests - run: mvn clean install + run: mvn clean verify + + - name: Generate JaCoCo report + run: mvn jacoco:report - name: Archive test results if: always() @@ -44,3 +47,9 @@ jobs: with: name: junit-test-results path: target/surefire-reports/*.xml + + - name: Upload JaCoCo report + uses: actions/upload-artifact@v3 + with: + name: jacoco-report + path: target/site/jacoco/ From d944696bb9ccd7f5386df4cb4c5a610e8999f933 Mon Sep 17 00:00:00 2001 From: Chrystian Melo Date: Fri, 14 Jun 2024 10:47:01 -0300 Subject: [PATCH 3/4] Configured dorny test-reporter to view code coverage results --- .github/workflows/maven.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index a1d20bb..d120f78 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -53,3 +53,11 @@ jobs: with: name: jacoco-report path: target/site/jacoco/ + + - name: Comment coverage report + uses: dorny/test-reporter@v1 + if: always() + with: + name: JaCoCo coverage + path: target/site/jacoco/jacoco.xml + reporter: jacoco From 6c278d03457decad812255466d458fbf10fb4769 Mon Sep 17 00:00:00 2001 From: Chrystian Melo Date: Fri, 14 Jun 2024 10:51:36 -0300 Subject: [PATCH 4/4] Docmentation: Added comments. --- src/main/java/com/mycompany/bookstore/gui/BookStoreGUI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/mycompany/bookstore/gui/BookStoreGUI.java b/src/main/java/com/mycompany/bookstore/gui/BookStoreGUI.java index 630b6d0..842d24f 100644 --- a/src/main/java/com/mycompany/bookstore/gui/BookStoreGUI.java +++ b/src/main/java/com/mycompany/bookstore/gui/BookStoreGUI.java @@ -35,7 +35,7 @@ public class BookStoreGUI extends javax.swing.JFrame { private final BookStore store; /** - * + * Painel central do usuário. */ private JPanel userPanel;