Skip to content

Commit

Permalink
add links to pending jobs in matrix job
Browse files Browse the repository at this point in the history
  • Loading branch information
yourbuddyconner committed Sep 20, 2024
1 parent a78ff8e commit 6c58329
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/adhoc-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ jobs:
const checkInterval = 60000; // 1 minute in milliseconds
const startTime = Date.now();
const runUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${triggeredRunId}`;
console.log(`Waiting for benchmark job to complete. Job URL: ${runUrl}`);
while (true) {
const run = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
Expand All @@ -171,17 +174,17 @@ jobs:
if (run.data.status === 'completed') {
console.log(`Benchmark workflow completed with conclusion: ${run.data.conclusion}`);
if (run.data.conclusion !== 'success') {
core.setFailed(`Benchmark workflow failed with conclusion: ${run.data.conclusion}`);
core.setFailed(`Benchmark workflow failed with conclusion: ${run.data.conclusion}. Job URL: ${runUrl}`);
}
break;
}
if (Date.now() - startTime > maxWaitTime) {
core.setFailed('Benchmark workflow did not complete within the maximum wait time');
core.setFailed(`Benchmark workflow did not complete within the maximum wait time. Job URL: ${runUrl}`);
break;
}
console.log(`Waiting for benchmark to complete... Current status: ${run.data.status}`);
console.log(`Waiting for benchmark to complete... Current status: ${run.data.status}. Job URL: ${runUrl}`);
await new Promise(resolve => setTimeout(resolve, checkInterval));
}
Expand Down

0 comments on commit 6c58329

Please sign in to comment.