-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: integrates publishing of unit test results in GitHub
- Loading branch information
1 parent
7ef7870
commit 1a856bc
Showing
1 changed file
with
29 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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] | ||
|