diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration.yml similarity index 86% rename from .github/workflows/integration-tests.yml rename to .github/workflows/integration.yml index 1adf468f..a9041700 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration.yml @@ -1,7 +1,7 @@ name: Integration Tests on: repository_dispatch: - types: [integration-check] + types: [my-check] jobs: myEvent: runs-on: ubuntu-latest @@ -17,8 +17,8 @@ jobs: gh api -X PATCH -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ -f 'status=in_progress' \ - -f 'output[title]=Integration Tests' \ - -f 'output[summary]=Running Integration Tests for Py SDK' \ + -f 'output[title]=My Check Run Title' \ + -f 'output[summary]=A *fancy* summary' \ /repos/${{ github.repository }}/check-runs/${{ github.event.client_payload.checkRunId }} #################################################### @@ -44,11 +44,10 @@ jobs: --input - <<- EOF { "conclusion": "success", - "details_url": "TODO", "output": { - "title": "Integration Tests", + "title": "My Check Run Title", "summary": "**Summary**: The run completed.", - "text": "Everything worked as expected." + "text": "Everything worked as expected. You should see a logo above." } } EOF \ No newline at end of file diff --git a/.github/workflows/test-check.yml b/.github/workflows/test-check.yml index c25cdec6..fa741a21 100644 --- a/.github/workflows/test-check.yml +++ b/.github/workflows/test-check.yml @@ -1,4 +1,4 @@ -name: Integration Tests Validation +name: Integration Tests Check # To trigger the check on: @@ -11,9 +11,10 @@ jobs: permissions: checks: write # Permission to create a Check Run contents: write # Permission to write a repository_dispatch requests + actions: write steps: - - name: Integration Tests Check - id: testcheck # An ID to allow the step to be referenced + - name: Create Check + id: checkrun # An ID to allow the step to be referenced env: GH_TOKEN: ${{ github.token }} # Expose the token for GH CLI run: | @@ -24,11 +25,12 @@ jobs: CHECKID=$(gh api -X POST -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - -f name='Integration Tests Check' \ + -f name='Super Check' \ -f head_sha='${{ github.event.pull_request.head.sha }}' \ -f status='queued' \ - -f 'output[title]=Integration Tests' \ - -f 'output[summary]=Pending Integration Tests for Py SDK' \ + -f 'output[title]=My Check Run Title' \ + -f 'output[summary]=A *fancy* summary' \ + -f 'output[text]=More detailed Markdown **text**' \ --jq '.id' \ /repos/${{ github.repository }}/check-runs) @@ -38,7 +40,7 @@ jobs: echo "checkId=$CHECKID" >> $GITHUB_OUTPUT - - name: Trigger Integration Tests + - name: Trigger env: GH_TOKEN: ${{ github.token }} run: | @@ -49,7 +51,7 @@ jobs: gh api -X POST -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ - -f 'event_type=integration-check' \ - -f 'client_payload[checkRunId]=${{ steps.testcheck.outputs.checkId }}' \ + -f 'client_payload[checkRunId]=${{ steps.checkrun.outputs.checkId }}' \ -f 'client_payload[sha]=${{ github.sha }}' \ - /repos/${{ github.repository }}/dispatches \ No newline at end of file + -f "ref=run-tests" \ + /repos/${{ github.repository }}/actions/workflows/integration.yml/dispatches \ No newline at end of file