actions icon indicating copy to clipboard operation
actions copied to clipboard

Propagate cancel workflow, add example for smoke test

Open krlmlr opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

The "check-full" example always starts all check processes in parallel. This is wasteful and may lead to the exhaustion of available GHA workers.

Describe the solution you'd like

In my projects, I'm using a combination of:

  • a cancel workflow that cancels all builds if a new commit is pushed to the same branch
  • a smoke test that tests only one build matrix element as a condition of starting the other elements

We could add examples for these workflows here.

Describe alternatives you've considered

Running checks locally before pushing as a "smoke test" slows down work. Often I run only the tests for one file, if at all, and rather wait for GHA results.

Additional context

Working example: https://github.com/cynkra/fledge/blob/main/.github/workflows/R-CMD-check.yaml .

krlmlr avatar Dec 12 '21 03:12 krlmlr

This might be related to #267: the doc checks could be run as part of the smoke tests, commit to the repository, and pass a new SHA to the main check matrix.

krlmlr avatar Dec 12 '21 04:12 krlmlr

Auto-cancellation is now simple, so we could document it.

We could also have an example for smoke tests, what would a smoke test include, just compiling the package?

gaborcsardi avatar Oct 19 '22 12:10 gaborcsardi

@krlmlr If you still want this, you could consider submitting a PR with an example workflow, otherwise I suggest we close it.

gaborcsardi avatar Feb 27 '24 12:02 gaborcsardi

My smoke tests run on R without even installing R, with whatever is installed on the runner. Has worked for me for a long time. The entire build matrix is run only when the smoke test is good.

I'll come back to it when I next work on my CI/CD infrastructure, no need to keep it open here.

krlmlr avatar Mar 03 '24 19:03 krlmlr

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

github-actions[bot] avatar Mar 18 '24 01:03 github-actions[bot]