github.com/bazelbuild/remote-apis-sdks@v0.0.0-20240425170053-8a36686a6350/.bazelci/presubmit.yml (about)

     1  ---
     2  validate_config: 1
     3  tasks:
     4    ubuntu1804:
     5      environment:
     6        GO_HOME: "$HOME/go-1.20.7"
     7        PATH: "$PATH:$GO_HOME/bin"
     8      shell_commands:
     9        - "echo --- Downloading and extracting Go 1.20.7 to $GO_HOME"
    10        - "mkdir $GO_HOME"
    11        - "curl https://mirror.bazel.build/go.dev/dl/go1.20.7.linux-amd64.tar.gz | tar xvz --strip-components=1 -C $GO_HOME"
    12        - "echo +++ Check go format"
    13        - "./check-gofmt.sh `find go -name '*.go'`"
    14        - "./check-golint.sh"
    15        - "echo +++ Check go vet"
    16        - "go vet ./..."
    17      build_targets:
    18        - "//..."
    19      test_targets:
    20        - "//..."
    21    # Check that "go build / test" works, too.
    22    ubuntu1804_gobuild:
    23      platform: ubuntu1804
    24      name: "go build / test"
    25      environment:
    26        GO_HOME: "$HOME/go-1.20.7"
    27        PATH: "$PATH:$GO_HOME/bin"
    28      shell_commands:
    29        - "echo --- Downloading and extracting Go 1.20.7 to $GO_HOME"
    30        - "mkdir $GO_HOME"
    31        - "curl https://mirror.bazel.build/go.dev/dl/go1.20.7.linux-amd64.tar.gz | tar xvz --strip-components=1 -C $GO_HOME"
    32        - "echo +++ Running go build"
    33        - "go build ./..."
    34        - "echo +++ Running go test"
    35        - "go test ./..."