From bdbc31294e1ff608dff2d5ac96b9c9dfb466b94a Mon Sep 17 00:00:00 2001 From: zekaizhang Date: Tue, 31 Oct 2023 13:21:27 -0400 Subject: [PATCH] Add CI reports generation --- .github/workflows/mavenTests.yml | 17 ++++++++++------- generateCIReports.sh | 13 +++++++++++++ 2 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 generateCIReports.sh diff --git a/.github/workflows/mavenTests.yml b/.github/workflows/mavenTests.yml index a111a51..a42d639 100644 --- a/.github/workflows/mavenTests.yml +++ b/.github/workflows/mavenTests.yml @@ -22,19 +22,22 @@ jobs: steps: - uses: actions/checkout@v3 - # - name: Set up JDK 17 - # uses: actions/setup-java@v3 - # with: - # java-version: '19' - # distribution: 'temurin' - # cache: maven + - name: Set up JDK 19 uses: actions/setup-java@v2 with: java-version: '19' distribution: 'adopt' cache: maven + + - name: Build project with Maven + run: ./mvnw clean install + - name: Run tests with Maven run: ./mvnw test + - name: Run Style Checker with Maven - run: ./mvnw checkstyle:check \ No newline at end of file + run: ./mvnw checkstyle:check + + - name: Generate CI reports + run: bash generateCIReports.sh \ No newline at end of file diff --git a/generateCIReports.sh b/generateCIReports.sh new file mode 100644 index 0000000..d928a2b --- /dev/null +++ b/generateCIReports.sh @@ -0,0 +1,13 @@ +echo "Generating CI reports..." + +echo "Building project and logging..." +./mvnw clean install >> ./reports/build-report.txt + + +./mvnw test >> ./reports/unittest-report.txt + + +./mvnw checkstyle:check >> ./reports/checkstyle-report.txt + + +echo "Job done!" \ No newline at end of file