tvl-depot/nix/bufCheck/default.nix
Kane York 4dd236be53 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>
2020-07-17 22:55:13 +00:00

9 lines
352 B
Nix

# 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
''