blob: f3eb9ec37c2e53dca257eebb9287aea24c245e31 [file] [log] [blame]
load("//bazel/go:go_test.bzl", "go_test")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "git",
srcs = ["git.go"],
importpath = "go.skia.org/infra/perf/go/git",
visibility = ["//visibility:public"],
deps = [
"//go/gitiles",
"//go/metrics2",
"//go/skerr",
"//go/sklog",
"//perf/go/config",
"//perf/go/git/provider",
"//perf/go/git/providers",
"//perf/go/types",
"@com_github_hashicorp_golang_lru//:golang-lru",
"@com_github_jackc_pgx_v4//:pgx",
"@com_github_jackc_pgx_v4//pgxpool",
"@io_opencensus_go//trace",
],
)
go_test(
name = "git_test",
srcs = ["git_test.go"],
data = ["//perf/migrations:cockroachdb"],
embed = [":git"],
# Perf CockroachDB tests fail intermittently when running locally (i.e. not on RBE) due to tests
# running in parallel against the same CockroachDB instance:
#
# pq: relation "schema_lock" already exists
#
# This is not an issue on RBE because each test target starts its own emulator instance.
#
# https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-tests
flaky = True,
deps = [
"//go/git/testutils",
"//perf/go/config",
"//perf/go/git/gittest",
"//perf/go/git/provider",
"//perf/go/types",
"@com_github_stretchr_testify//assert",
"@com_github_stretchr_testify//require",
],
)