diff --git a/.github/workflows/bff_develop.yml b/.github/workflows/bff_develop.yml index b2dcefa1f..9ba5b315e 100644 --- a/.github/workflows/bff_develop.yml +++ b/.github/workflows/bff_develop.yml @@ -44,15 +44,42 @@ jobs: - name: build, package and publish the image run: | VER_TAG=$(echo ${{ steps.meta.outputs.tags }} | cut --delimiter=: --fields=2-3) - mvn -B clean package spring-boot:build-image -am -pl iris-client-bff -Dspring-boot.build-image.publish=true -Dversion.tag=$VER_TAG + mvn -B clean verify spring-boot:build-image -am -pl iris-client-bff -Dspring-boot.build-image.publish=true -Dversion.tag=$VER_TAG env: DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} DOCKER_HUB_PW: ${{ secrets.DOCKER_HUB_PW }} + + - name: Upload Test Reports + if: always() + uses: actions/upload-artifact@v2 + with: + name: test-reports + path: | + **/surefire-reports/*.xml + **/failsafe-reports/*.xml + + publish-test-results: + name: Publish Test Results + needs: build + runs-on: ubuntu-latest + steps: + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + name: test-reports + path: reports + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v1 + with: + files: reports/**/*.xml + report_individual_runs: true + check_run_annotations_branch: "*" container_scan: name: Trivy Container Scan needs: build - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2.3.4 diff --git a/.github/workflows/release-gitflow.yml b/.github/workflows/release-gitflow.yml index b3a40afec..9d4f03ce0 100644 --- a/.github/workflows/release-gitflow.yml +++ b/.github/workflows/release-gitflow.yml @@ -68,6 +68,33 @@ jobs: @semantic-release/git env: GITHUB_TOKEN: ${{ secrets.JK_GITHUB_TOKEN }} + + - name: Upload Test Reports + if: always() + uses: actions/upload-artifact@v2 + with: + name: test-reports + path: | + **/surefire-reports/*.xml + **/failsafe-reports/*.xml + + publish-test-results: + name: Publish Test Results + needs: build + runs-on: ubuntu-latest + steps: + - name: Download Artifacts + uses: actions/download-artifact@v2 + with: + name: test-reports + path: reports + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v1 + with: + files: reports/**/*.xml + report_individual_runs: true + check_run_annotations_branch: "*" container_scan: needs: release-client diff --git a/.prepare-release.sh b/.prepare-release.sh index 2b9baf7e1..90d8c7fa4 100644 --- a/.prepare-release.sh +++ b/.prepare-release.sh @@ -97,7 +97,7 @@ mvn versions:set -DnewVersion=$VERSION -DprocessAllModules=true # Package the new version and copy it to release folder # These files will be upload to github by @semantic-release/github -mvn -B clean package spring-boot:repackage spring-boot:build-image -Dspring-boot.build-image.publish=false +mvn -B clean verify spring-boot:repackage spring-boot:build-image -Dspring-boot.build-image.publish=false mkdir release && cp ./iris-client-bff/target/*.jar release BFF_IMAGE_NAME="$NAMESPACE/iris-client-bff"