Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
contents: read
issues: write
pull-requests: write
statuses: write

steps:
- name: React to trigger comment
Expand All @@ -39,6 +40,20 @@ jobs:
SHA=$(gh api repos/${{ github.repository }}/pulls/${{ github.event.issue.number }} --jq '.head.sha')
echo "sha=$SHA" >> "$GITHUB_OUTPUT"

- name: Set commit status to pending
uses: actions/github-script@v7
with:
script: |
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: '${{ steps.sha.outputs.sha }}',
state: 'pending',
target_url: `${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}`,
description: 'Simulation test running…',
context: 'Simulation Tests',
});

- uses: actions/checkout@v4
with:
ref: ${{ steps.sha.outputs.sha }}
Expand Down Expand Up @@ -87,6 +102,23 @@ jobs:
path: anims/ci_test.mp4
if-no-files-found: warn

- name: Update commit status
uses: actions/github-script@v7
if: always()
with:
script: |
const success = '${{ steps.verify.outcome }}' === 'success';
const runUrl = `${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}`;
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: '${{ steps.sha.outputs.sha }}',
state: success ? 'success' : 'failure',
target_url: runUrl,
description: success ? 'Simulation test passed' : 'Simulation test failed',
context: 'Simulation Tests',
});

- name: Comment result on PR
uses: actions/github-script@v7
if: always()
Expand Down