Skip to content

Commit

Permalink
chore: integrates publishing of unit test results in GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
jekutzsche committed Sep 23, 2021
1 parent 7ef7870 commit 1a856bc
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/bff_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 Unit Test Results
if: always()
uses: actions/upload-artifact@v2
with:
name: unit-test-results
path: |
**/surefire-reports/*.xml
**/failsafe-reports/*.xml
publish-test-results:
name: "Publish Unit Tests Results"
needs: build
runs-on: ubuntu-latest
# the build job might be skipped, we don't need to run this job then
if: success() || failure()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: unit-test-results
path: reports

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
with:
files: reports/**/*.xml

container_scan:
name: Trivy Container Scan
needs: build
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
Expand Down

0 comments on commit 1a856bc

Please sign in to comment.