Skip to content

Commit c5cfdd7

Browse files
hack
1 parent 96ceae9 commit c5cfdd7

2 files changed

Lines changed: 39 additions & 53 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/dummy.yaml

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,44 @@
1-
name: dummy
2-
1+
name: CI
32
on:
4-
workflow_dispatch:
5-
push:
63
pull_request:
4+
types: [opened, reopened]
5+
push:
6+
branches: ["**"]
7+
tags:
8+
- "v[0-9]+.[0-9]+.[0-9]+"
9+
- "v[0-9]+.[0-9]+.[0-9]+-*"
710

811
jobs:
9-
dummy:
10-
runs-on: ubuntu-latest
12+
test:
13+
name: Run tests
14+
runs-on: ubuntu-20.04
15+
services:
16+
consul:
17+
image: consul:1.9.13 # v0.6.4
18+
ports: [ "8500:8500" ]
19+
env:
20+
CONSUL_LOCAL_CONFIG: '{"session_ttl_min": "1s"}'
21+
CONSUL_BIND_INTERFACE: eth0
22+
etcd:
23+
image: quay.io/coreos/etcd:v3.0.17 # v3.5.1
24+
ports: [ "4001:4001" ]
25+
env:
26+
ETCD_ADVERTISE_CLIENT_URLS: http://127.0.0.1:4001
27+
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:4001
28+
zookeeper:
29+
image: zookeeper:3.7.0
30+
ports: [ "2181:2181" ]
1131
steps:
12-
-
13-
name: Checkout
14-
uses: actions/checkout@v2
32+
- uses: actions/checkout@v2
33+
- uses: actions/setup-go@v2
34+
with:
35+
go-version: '^1.17.5'
36+
- run: cd tools && go install github.com/GeertJohan/fgt github.com/mattn/goveralls golang.org/x/lint golang.org/x/tools/cmd/cover
37+
- run: script/validate-gofmt
38+
- run: go vet ./...
39+
# - run: fgt /home/runner/go/bin/lint ./...
40+
- run: go test -v -race ./...
41+
env:
42+
LIBKV_TEST_SHORT_TIMEOUT: 10s
43+
- run: script/coverage
44+
- run: goveralls -service=travis-ci -coverprofile=goverage.report

0 commit comments

Comments
 (0)