Skip if there are newer runs
See original GitHub issueI have a quite huge integration test suit and would like to cancel it if at least one newer run is scheduled/in progress.
Is something like this possible?
jobs:
skip_individual_steps_job:
runs-on: ubuntu-latest
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'false'
concurrent_skipping: 'newer_runs' # <-- a value that makes concurrent skip functionality works only if newer runs exist
- if: ${{ steps.skip_check.outputs.should_skip != 'true' }}
run: |
echo "Run long test suit" & sleep 60
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (9 by maintainers)
Top Results From Across the Web
Is it possible to skip a new scheduled flow run if a previous ...
Imagine that you have a workflow scheduled to run hourly. But sometimes this flow may take longer than an hour and you want...
Read more >C++ - Skipping code after first run-through? - Stack Overflow
On the first run, it executes fine. The problem however is when it runs through the code again after the user enters 'r'...
Read more >Build Azure Repos Git repositories - Azure Pipelines
The pipelines triggered by changes to the PR's source branch, if there are no pushed commits whose messages or descriptions contain [skip ci]...
Read more >Mocha - the fun, simple, flexible JavaScript test framework
skip ('should return -1 unless present', function () { // this test will not be run }); it('should return the index when present',...
Read more >How to run a Skip Test in Robot Framework - Neova Solutions
Sometimes skipping tests can play a crucial role in saving time. When there are certain types of errors in the given test case,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To be honest, I am not entirely sure how to solve it because I never combined those two features together. If you look at the checks in https://github.com/fkirc/skip-duplicate-actions/blob/b68a254ac00b33f707866bae1ebe647e56363d1a/src/index.ts#L144, you might figure out a solution.
If you are using the
same_content
option, then you might need to add the optiondo_not_skip: ["push", "workflow_dispatch", "schedule"]
or something similar. Otherwise, it might happen that both PR and PUSH are skipped.