feat(ci): run buf check lint in CI
Breaking change detection will run but not enforce. Emoji of water buffalo was chosen by @pedge fiat in the bufbuild slack. Change-Id: Ie292f2bfddc0e3bc512e4a138c0b5d0fa2603bad Reviewed-on: https://cl.tvl.fyi/c/depot/+/1247 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: glittershark <grfn@gws.fyi>
This commit is contained in:
parent
cf34184038
commit
4dd236be53
2 changed files with 13 additions and 0 deletions
9
nix/bufCheck/default.nix
Normal file
9
nix/bufCheck/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Check protobuf syntax and breaking.
|
||||
#
|
||||
{ depot, pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "ci-buf-check" ''
|
||||
${depot.third_party.bufbuild}/bin/buf check lint --input "${depot.depotPath}"
|
||||
# Report-only
|
||||
${depot.third_party.bufbuild}/bin/buf check breaking --input "${depot.depotPath}" --against-input "${depot.depotPath}/.git#branch=canon" || true
|
||||
''
|
|
@ -17,5 +17,9 @@ let
|
|||
command = "nix-build -A ciBuilds.__allTargets --show-trace";
|
||||
label = ":duck:";
|
||||
}
|
||||
{
|
||||
command = "${depot.nix.bufCheck}/bin/ci-buf-check";
|
||||
label = ":water_buffalo:";
|
||||
}
|
||||
];
|
||||
in writeText "depot.yaml" (toJSON pipeline)
|
||||
|
|
Loading…
Reference in a new issue