forked from eclipse-leshan/leshan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
88762c8
commit ee8deb4
Showing
1 changed file
with
32 additions
and
27 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 |
---|---|---|
|
@@ -22,67 +22,72 @@ jobs: | |
distribution: 'adopt' | ||
cache: maven | ||
|
||
- name: Prepare Check Runs | ||
uses: dflydev/[email protected] | ||
# prepare Github Checks (just to display result elegantly) | ||
- name: Prepare Build Check | ||
uses: LouisBrunner/[email protected] | ||
id: build_check | ||
with: | ||
name: Build Code | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
checks: | | ||
[ | ||
{ "id": "build", "name": "Build Code" }, | ||
{ "id": "unitTests", "name": "Unit Tests" } | ||
] | ||
status: "queued" | ||
status: queued | ||
|
||
- name: Prepare Unit tests Check | ||
uses: LouisBrunner/[email protected] | ||
id: unitTests_check | ||
with: | ||
name: Unit Tests | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
status: queued | ||
|
||
# Build Code | ||
- name: Build Starting | ||
uses: dflydev/check-runs-action@v1.0.6 | ||
uses: LouisBrunner/checks-action@v1.2.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
id: build | ||
check_id: ${{ steps.build_check.outputs.check_id }} | ||
status: in_progress | ||
|
||
- name: Build | ||
id: build | ||
continue-on-error: true | ||
run: mvn --batch-mode -DskipTests -Dskip.yarn package | ||
|
||
- name: Build Conclusion | ||
uses: dflydev/check-runs-action@v1.0.6 | ||
uses: LouisBrunner/checks-action@v1.2.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
id: build | ||
check_id: ${{ steps.build_check.outputs.check_id }} | ||
status: completed | ||
conclusion: ${{ steps.build.outcome }} | ||
fail-on-error: true | ||
|
||
|
||
# Build Code | ||
- name: Unit Tests Starting | ||
uses: dflydev/check-runs-action@v1.0.6 | ||
uses: LouisBrunner/checks-action@v1.2.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
id: unitTests | ||
check_id: ${{ steps.unitTests_check.outputs.check_id }} | ||
status: in_progress | ||
|
||
- name: Unit Tests | ||
id: unitTests | ||
continue-on-error: true | ||
run: mvn test '-Dtest=!org.eclipse.leshan.integration.tests.**' -DfailIfNoTests=false -Dskip.yarn -Dmaven.test.failure.ignore=true | ||
run: mvn test '-Dtest=!org.eclipse.leshan.integration.tests.**' -DfailIfNoTests=false -Dskip.yarn | ||
|
||
- name: Unit Tests Conclusion | ||
uses: dflydev/check-runs-action@v1.0.6 | ||
uses: LouisBrunner/checks-action@v1.2.0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
id: unitTests | ||
check_id: ${{ steps.unitTests_check.outputs.check_id }} | ||
status: completed | ||
conclusion: ${{ steps.unitTests.outcome }} | ||
|
||
#- name: Integration Tests | ||
# run: mvn test '-Dtest=org.eclipse.leshan.integration.tests.**' -Dsurefire.rerunFailingTestsCount=3 -DfailIfNoTests=false -Dskip.yarn -Dmaven.test.failure.ignore=true | ||
|
||
|
||
- name: Report | ||
uses: mikepenz/[email protected] | ||
if: always() | ||
with: | ||
check_name: Tests Report | ||
report_paths: '**/target/surefire-reports/*.xml' | ||
|
||
- name: Clean up checks | ||
if: always() | ||
uses: dflydev/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
conclusion: cancelled | ||
fail-on-error: true |