From f6c388913ecaa6e2b5f76d18603869efc32d41ee Mon Sep 17 00:00:00 2001 From: "devops-llm-bot[bot]" <147885296+devops-llm-bot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 01:06:38 +0000 Subject: [PATCH 1/2] Add build and test workflow with static analysis checks and code coverage --- .github/workflows/build-autogenerated.yml | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build-autogenerated.yml diff --git a/.github/workflows/build-autogenerated.yml b/.github/workflows/build-autogenerated.yml new file mode 100644 index 0000000..402b769 --- /dev/null +++ b/.github/workflows/build-autogenerated.yml @@ -0,0 +1,32 @@ +name: Build and Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Build with Maven + run: mvn -B package --file service-center-app/pom.xml + + - name: Run tests + run: mvn test --file service-center-app/pom.xml + + - name: Static code analysis + run: mvn checkstyle:check + + - name: Code coverage + run: mvn jacoco:report From 602df28d5a008ebf6a9b65e9037bb63b8ed6bce4 Mon Sep 17 00:00:00 2001 From: "devops-llm-bot[bot]" <147885296+devops-llm-bot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 01:09:05 +0000 Subject: [PATCH 2/2] Update build workflow to fix pom.xml path issue --- .github/workflows/build-autogenerated.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-autogenerated.yml b/.github/workflows/build-autogenerated.yml index 402b769..a0df861 100644 --- a/.github/workflows/build-autogenerated.yml +++ b/.github/workflows/build-autogenerated.yml @@ -20,13 +20,13 @@ jobs: java-version: 11 - name: Build with Maven - run: mvn -B package --file service-center-app/pom.xml + run: mvn -B package --file pom.xml - name: Run tests - run: mvn test --file service-center-app/pom.xml + run: mvn test --file pom.xml - name: Static code analysis run: mvn checkstyle:check - name: Code coverage - run: mvn jacoco:report + run: mvn jacoco:report \ No newline at end of file