Skip to content

Commit

Permalink
check git action again
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernard31 committed Jun 9, 2022
1 parent 88762c8 commit ee8deb4
Showing 1 changed file with 32 additions and 27 deletions.
59 changes: 32 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ee8deb4

Please sign in to comment.