Canop / Canop/bacon

Run multiple jobs after each other

Open
#165 14 comments 10 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.4k
Forks
126
Avg merge
2d 1h
Merged PRs (30d)
7

Description

Hi,

Thanks for such a great project!

I would love to always run the tests no matter if clippy or check finds any errors. I believe that in https://github.com/Canop/bacon/issues/42 they talk about something similar (always seeing the output of the test job).

Motivation: For me it is not uncommon to be working on something but still have some clippy/check issues (usually unused functions, especially when writing tests). It would be nice if I could instruct bacon to always run the tests even though I get some warnings from the other checks.

What I tried: I tried chaining the jobs together using the `on_success = "job:clippy"` syntax on my `test` definition but then when I make a change the tests are not re-run as bacon is now on the clippy job. As I might have a warning in clippy I cant add a `on_success = "back"` as it is not seen as a success. I did try setting `allow_warnings = true` and then back on success but it did not seem to work.

Being able to run both clippy/check and tests and show the output of both (or just the tests pass! header) always would be a nice feature.

Here is an example of what I have tried.

```toml
[jobs.clippy]
command = [
"cargo", "clippy",
"--all-targets",
"--color", "always",
]
need_stdout = false
allow_warnings = true
on_success = "back"

[jobs.test]
command = [
"cargo", "test", "--color", "always",
"--", "--color", "always", # see https://github.com/Canop/bacon/issues/124
]
need_stdout = true
on_success = "job:clippy"
```

Contributor guide

Open the contributing guide

Research direction

Start by reading the job chaining behavior described in this issue and the related issue #42, then inspect the handling of `on_success`, `allow_warnings`, and the `back` job transition. Done means a configuration can run clippy/check and tests after the same change, while retaining the relevant output even when an earlier job reports warnings or errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.