CI: Add lint steps to new pipeline
@@ -19,3 +19,35 @@ steps:
- exit_status: -1 # Agent was lost
- exit_status: 255 # Forced agent shutdown
timeout_in_minutes: 10
+ - label: "Check generated go_deps.bzl file is up to date with go.mod"
+ command:
+ - "mkdir /tmp/$BUILDKITE_STEP_ID/"
+ - "cp go.mod go.sum go_deps.bzl /tmp/$BUILDKITE_STEP_ID/"
+ - "make godeps -B"
+ - "bazel-${BUILDKITE_PIPELINE_SLUG}/external/go_sdk/bin/go mod tidy"
+ - "diff -u /tmp/$BUILDKITE_STEP_ID/go.mod go.mod"
+ - "diff -u /tmp/$BUILDKITE_STEP_ID/go.sum go.sum"
+ - "diff -u /tmp/$BUILDKITE_STEP_ID/go_deps.bzl go_deps.bzl"
+ key: go_deps_lint
+ retry:
+ automatic:
+ - exit_status: -1 # Agent was lost
+ - exit_status: 255 # Forced agent shutdown
+ - label: "Check generated go/proto files in git"
+ command:
+ - "mkdir /tmp/$BUILDKITE_STEP_ID/"
+ - "cp -R go/proto/ /tmp/$BUILDKITE_STEP_ID/"
+ - "make gogen"
+ - "diff -ur /tmp/$BUILDKITE_STEP_ID/proto/ go/proto/"
+ key: go_gen_lint
+ retry:
+ automatic:
+ - exit_status: -1 # Agent was lost
+ - exit_status: 255 # Forced agent shutdown
+ - label: "Lint :bazel:"
+ command: ./scion.sh lint
+ key: lint
+ retry:
+ automatic:
+ - exit_status: -1 # Agent was lost
+ - exit_status: 255 # Forced agent shutdown
