mirror of
https://github.com/git/git.git
synced 2024-05-28 15:06:11 +02:00
Merge branch 'js/ci-ghwf-dedup-tests'
GitHub Actions automated test improvement to skip tests on a tree identical to what has already been tested. * js/ci-ghwf-dedup-tests: ci: make the "skip-if-redundant" check more defensive ci: work around old records of GitHub runs
This commit is contained in:
commit
876511ef61
|
@ -41,6 +41,7 @@ jobs:
|
|||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
try {
|
||||
// Figure out workflow ID, commit and tree
|
||||
const { data: run } = await github.actions.getWorkflowRun({
|
||||
owner: context.repo.owner,
|
||||
|
@ -65,12 +66,15 @@ jobs:
|
|||
core.setOutput('enabled', ' but skip');
|
||||
break;
|
||||
}
|
||||
if (tree_id === run.head_commit.tree_id) {
|
||||
if (run.head_commit && tree_id === run.head_commit.tree_id) {
|
||||
core.warning(`Successful run for the tree ${tree_id}: ${run.html_url}`);
|
||||
core.setOutput('enabled', ' but skip');
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
core.warning(e);
|
||||
}
|
||||
|
||||
windows-build:
|
||||
needs: ci-config
|
||||
|
|
Loading…
Reference in New Issue