Skip to content

Commit 2ba94a2

Browse files
committed
Including test and coverage workflow
1 parent 965a87d commit 2ba94a2

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Test and coverage
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
with:
11+
fetch-depth: 2
12+
- uses: actions/setup-go@v2
13+
with:
14+
go-version: '1.17'
15+
- name: Run coverage
16+
run: go test -race -coverprofile=coverage.txt -covermode=atomic
17+
- name: Upload coverage to Codecov
18+
uses: codecov/codecov-action@v3

redisgraph-bechmark-go.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func main() {
3636
flag.Var(&benchmarkQueriesRO, "query-ro", "Specify a RedisGraph read-only query to send in quotes. You can run multiple commands (both read/write) on the same benchmark. Each command that you specify is run with its ratio. For example: -query=\"CREATE (n)\" -query-ratio=0.5 -query-ro=\"MATCH (n) RETURN n\" -query-ratio=0.5")
3737
flag.Var(&benchmarkQueryRates, "query-ratio", "The query ratio vs other queries used in the same benchmark. Each command that you specify is run with its ratio. For example: -query=\"CREATE (n)\" -query-ratio=0.5 -query=\"MATCH (n) RETURN n\" -query-ratio=0.5")
3838
jsonOutputFile := flag.String("json-out-file", "benchmark-results.json", "Name of json output file to output benchmark results. If not set, will not print to json.")
39-
cliUpdateTick := flag.Duration("reporting-period", time.Second*10, "Period to report stats.")
39+
cliUpdateTick := flag.Duration("reporting-period", time.Second*5, "Period to report stats.")
4040
// data sink
4141
runName := flag.String("exporter-run-name", "perf-run", "Run name.")
4242
rtsHost := flag.String("exporter-rts-host", "127.0.0.1", "RedisTimeSeries hostname.")

0 commit comments

Comments
 (0)