Skip to content

Commit

Permalink
bacon: Add health failing watch
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Oct 22, 2024
1 parent 4d460ac commit 22442f4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 21 deletions.
45 changes: 27 additions & 18 deletions bacon.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ need_stdout = false

# Run clippy on the default target
[jobs.clippy]
command = [
"cargo", "clippy",
"--color", "always",
]
command = ["cargo", "clippy", "--color", "always"]
need_stdout = false

# Run clippy on all targets
Expand All @@ -37,11 +34,7 @@ need_stdout = false
# ]
# need_stdout = false
[jobs.clippy-all]
command = [
"cargo", "clippy",
"--all-targets",
"--color", "always",
]
command = ["cargo", "clippy", "--all-targets", "--color", "always"]
need_stdout = false

# This job lets you run
Expand All @@ -50,8 +43,13 @@ need_stdout = false
# - the tests of a package: bacon test -- -- -p config
[jobs.test]
command = [
"cargo", "test", "--color", "always",
"--", "--color", "always", # see https://github.com/Canop/bacon/issues/124
"cargo",
"test",
"--color",
"always",
"--",
"--color",
"always", # see https://github.com/Canop/bacon/issues/124
]
need_stdout = true

Expand All @@ -64,7 +62,7 @@ need_stdout = false
[jobs.doc-open]
command = ["cargo", "doc", "--color", "always", "--no-deps", "--open"]
need_stdout = false
on_success = "back" # so that we don't open the browser at each change
on_success = "back" # so that we don't open the browser at each change

# You can run your application and have the result displayed in bacon,
# *if* it makes sense for this crate.
Expand All @@ -75,9 +73,11 @@ on_success = "back" # so that we don't open the browser at each change
# of waiting for program's end.
[jobs.run]
command = [
"cargo", "run",
"--color", "always",
# put launch parameters for your program behind a `--` separator
"cargo",
"run",
"--color",
"always",
# put launch parameters for your program behind a `--` separator
]
need_stdout = true
allow_warnings = true
Expand All @@ -87,8 +87,16 @@ background = true
# as the code compiles.
# Call it as
# bacon ex -- my-example
[jobs.ex]
command = ["cargo", "run", "--color", "always", "--example"]
[jobs.health-failing]
command = [
"cargo",
"run",
"--color",
"always",
"--",
"health",
"./crates/omnix-health/failing",
]
need_stdout = true
allow_warnings = true

Expand All @@ -98,4 +106,5 @@ allow_warnings = true
# should go in your personal global prefs.toml file instead.
[keybindings]
# alt-m = "job:my-job"
c = "job:clippy-all" # comment this to have 'c' run clippy on only the default target
c = "job:clippy-all" # comment this to have 'c' run clippy on only the default target
h = "job:health-failing"
6 changes: 3 additions & 3 deletions crates/omnix-health/failing/flake.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Just a flake.nix to configure nix-health to fail all possible checks
# Just a flake.nix to configure omnix-health to fail all possible checks
#
# Used for testing purposes; run as:
# just watch-nix-health ./crates/omnix-health/failing/
# cargo run -p omnix-cli health ./crates/omnix-health/failing

{
outputs = _: {
nix-health.default = {
om.health.default = {
caches.required = [ "https://unknown.cachix.org" "https://example.com" ];
nix-version.min-required = "9.99.99";
system = {
Expand Down

0 comments on commit 22442f4

Please sign in to comment.