-
Notifications
You must be signed in to change notification settings - Fork 69
105 lines (105 loc) · 4.5 KB
/
pull-requests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{
"jobs": {
"build_and_test": {
"runs-on": "ubuntu-latest",
"steps": [
{
"name": "Restore Bazelisk cache",
"uses": "actions/cache@v1",
"with": {
"key": "bazelisk",
"path": "~/.cache/bazelisk"
}
},
{
"name": "Installing Bazelisk",
"run": "bazelisk_fingerprint=231ec5ca8115e94c75a1f4fbada1a062b48822ca04f21f26e4cb1cd8973cd458 &&\n(echo \"${bazelisk_fingerprint} ${HOME}/.cache/bazelisk/bazel\" | sha256sum --check --quiet) || (\n mkdir -p ~/.cache/bazelisk &&\n curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64 > ~/.cache/bazelisk/bazelisk.tmp &&\n chmod +x ~/.cache/bazelisk/bazelisk.tmp &&\n mv ~/.cache/bazelisk/bazelisk.tmp ~/.cache/bazelisk/bazel\n) &&\n(echo \"${bazelisk_fingerprint} ${HOME}/.cache/bazelisk/bazel\" | sha256sum --check --quiet) &&\necho \"~/.cache/bazelisk\" >> ${GITHUB_PATH}\n"
},
{
"name": "Check out source code",
"uses": "actions/checkout@v1"
},
{
"name": "Gazelle",
"run": "bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro go_dependencies.bzl%go_dependencies -prune && bazel run //:gazelle"
},
{
"name": "Buildifier",
"run": "sed '/^$/d' go_dependencies.bzl > go_dependencies.bzl.new && mv go_dependencies.bzl.new go_dependencies.bzl && bazel run @com_github_bazelbuild_buildtools//:buildifier"
},
{
"name": "Gofmt",
"run": "bazel run @cc_mvdan_gofumpt//:gofumpt -- -lang 1.19 -w -extra $(pwd)"
},
{
"name": "GitHub workflows",
"run": "bazel build //tools/github_workflows && cp bazel-bin/tools/github_workflows/*.yaml .github/workflows"
},
{
"name": "DISABLED: Check the diff between docker-compose and Kubernetes configs",
"run": "true || tools/diff-docker-and-k8s-configs.sh > tools/expected-docker-and-k8s-configs.diff"
},
{
"name": "Test style conformance",
"run": "git diff --exit-code HEAD --"
},
{
"name": "Golint",
"run": "bazel run @org_golang_x_lint//golint -- -set_exit_status $(pwd)/..."
},
{
"name": "Check for ineffective assignments",
"run": "bazel run @com_github_gordonklaus_ineffassign//:ineffassign $(pwd)"
},
{
"name": "Test bare deployment",
"run": "tools/test-deployment-bare.sh"
},
{
"name": "Test docker-compose deployment",
"run": "tools/test-deployment-docker-compose.sh"
},
{
"name": "linux_amd64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //..."
},
{
"name": "linux_386: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_386 //..."
},
{
"name": "linux_arm: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_arm //..."
},
{
"name": "linux_arm64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_arm64 //..."
},
{
"name": "darwin_amd64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:darwin_amd64 //..."
},
{
"name": "darwin_arm64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:darwin_arm64 //..."
},
{
"name": "freebsd_amd64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:freebsd_amd64 //..."
},
{
"name": "windows_amd64: build and test",
"run": "bazel build --platforms=@io_bazel_rules_go//go/toolchain:windows_amd64 //..."
}
]
}
},
"name": "pull-requests",
"on": {
"pull_request": {
"branches": [
"master"
]
}
}
}