Skip to content

Commit

Permalink
Single check
Browse files Browse the repository at this point in the history
  • Loading branch information
pavetok committed Sep 16, 2023
1 parent 39a953f commit 7922cfd
Showing 1 changed file with 9 additions and 39 deletions.
48 changes: 9 additions & 39 deletions .github/workflows/solution-sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
runs-on: ubuntu-22.04
permissions:
checks: write
packages: write
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/prepare
Expand All @@ -31,24 +32,6 @@ jobs:
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/[email protected]
with:
script: |
// Docs: https://docs.github.com/en/rest/checks/runs#create-a-check-run
// Rest: https://octokit.github.io/rest.js/v20#checks-create
await github.rest.checks.create({
owner: context.repo.owner,
repo: context.repo.repo,
head_sha: context.sha,
name: "codebase-checks",
status: "completed",
conclusion: "${{ steps.codebase.outcome }}",
output: {
title: "Codebase checks",
summary: "${{ steps.codebase.outcome }}",
text: "${{ steps.codebase.outcome }}",
},
});
- id: binaries
run: >
ansible-playbook binaries.yml
Expand All @@ -58,34 +41,21 @@ jobs:
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: EnricoMi/[email protected]
if: ${{ !cancelled() }}
with:
check_name: Unit Test Report
check_run_annotations: none
compare_to_earlier_commit: false
action_fail_on_inconclusive: true
action_fail: true
job_summary: false
comment_mode: off
files: |
libs/*/target/surefire-reports/TEST-*.xml
apps/*/target/surefire-reports/TEST-*.xml
- uses: actions/[email protected]
if: ${{ !cancelled() }}
with:
script: |
// Docs: https://docs.github.com/en/rest/checks/runs#create-a-check-run
// Rest: https://octokit.github.io/rest.js/v20#checks-create
const conclusion = '${{ steps.binaries.outcome }}'
await github.rest.checks.create({
owner: context.repo.owner,
repo: context.repo.repo,
head_sha: context.sha,
name: "unit-tests",
name: "Pipeline status",
status: "completed",
conclusion: "${{ steps.binaries.outcome }}",
conclusion: conclusion,
output: {
title: "Unit tests",
summary: "${{ steps.binaries.outcome }}",
text: "${{ steps.binaries.outcome }}",
},
title: "Pipeline status",
summary: `Codebase checks: ${{ steps.codebase.outcome }}
Binaries checks: ${{ steps.binaries.outcome }}`
}
});

0 comments on commit 7922cfd

Please sign in to comment.