From 484fdc2344e0f78219add0ced23d531e0cc0302b Mon Sep 17 00:00:00 2001 From: KoonQi Date: Wed, 6 Sep 2023 00:30:39 +0800 Subject: [PATCH] editted build.yml and pom.xml --- .github/workflows/build.yml | 85 +++++++++++++++++++------------------ pom.xml | 16 +++++-- 2 files changed, 55 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1533e62f..35f2c1232 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,59 +3,60 @@ name: Build and Test on: push: branches: - - '*' + - "*" jobs: build: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 - - name: Set up JDK 17 - uses: actions/setup-java@v2 - with: - java-version: '17' - distribution: 'adopt' + - name: Set up JDK 17 + uses: actions/setup-java@v2 + with: + java-version: "17" + distribution: "adopt" - - name: Build with Maven - run: mvn clean package + - name: Build with Maven + run: mvn clean package - - name: Run tests with Maven - run: mvn test + - name: Run tests with Maven + run: mvn test - # Store build artifacts for history - - name: Archive Build Artifacts - uses: actions/upload-artifact@v2 - with: - name: build-artifacts - path: target/ + # Store build artifacts for history + - name: Archive Build Artifacts + uses: actions/upload-artifact@v2 + with: + name: build-artifacts + path: target/ - # Static Code Analysis with Checkstyle (Replace with your preferred tool) - - name: Static Code Analysis - run: | - # Install and run Checkstyle (replace with your tool) - # Example: mvn checkstyle:check - echo "Run your static code analysis tool here" + # Static Code Analysis with Checkstyle + - name: Static Code Analysis with Checkstyle + run: | + # Install and run Checkstyle + mvn org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1:checkstyle - # Store static code analysis reports - - name: Archive Static Code Analysis Reports - uses: actions/upload-artifact@v2 - with: - name: static-code-analysis-reports - path: path/to/static/code/analysis/reports + # Run Checkstyle + mvn checkstyle:check - # Code Coverage (Replace with your preferred tool) - - name: Code Coverage - run: | - # Run your code coverage tool here - # Example: mvn jacoco:report - echo "Run your code coverage tool here" + # Store static code analysis reports + - name: Archive Static Code Analysis Reports + uses: actions/upload-artifact@v2 + with: + name: static-code-analysis-reports + path: .github/workflows/reports/checkstyle/ - # Store code coverage reports - - name: Archive Code Coverage Reports - uses: actions/upload-artifact@v2 - with: - name: code-coverage-reports - path: path/to/code/coverage/reports + # Code Coverage + - name: Code Coverage + run: | + # Run JaCoCo report generation + mvn jacoco:report + + # Store code coverage reports + - name: Archive Code Coverage Reports + uses: actions/upload-artifact@v2 + with: + name: code-coverage-reports + path: .github/workflows/reports/jacoco/ diff --git a/pom.xml b/pom.xml index ce92ea579..f1c226cae 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,7 @@ - + 4.0.0 org.springframework.samples spring-petclinic @@ -33,6 +35,10 @@ 0.0.11 0.0.39 + + 1.16.3 + + @@ -166,7 +172,8 @@ - This build requires at least Java ${java.version}, update your JVM, and run the build again + This build requires at least Java ${java.version}, update your JVM, and + run the build again ${java.version} @@ -370,7 +377,8 @@ ${basedir}/src/main/scss/ ${basedir}/src/main/resources/static/resources/css/ - ${project.build.directory}/webjars/META-INF/resources/webjars/bootstrap/${webjars-bootstrap.version}/scss/ + + ${project.build.directory}/webjars/META-INF/resources/webjars/bootstrap/${webjars-bootstrap.version}/scss/ @@ -444,4 +452,4 @@ - + \ No newline at end of file