mirror of https://github.com/tikv/client-go.git
add integration test with tikv (#92)
Signed-off-by: disksing <i@disksing.com>
This commit is contained in:
parent
312a8aff9b
commit
d3e9be7621
|
|
@ -0,0 +1,47 @@
|
|||
name: Integration Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ v2 ]
|
||||
pull_request:
|
||||
branches: [ v2 ]
|
||||
|
||||
jobs:
|
||||
integration-tikv:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
|
||||
- name: Fetch PD
|
||||
uses: shrink/actions-docker-extract@v1
|
||||
id: extract-pd
|
||||
with:
|
||||
image: pingcap/pd:nightly
|
||||
path: /pd-server
|
||||
|
||||
- name: Fetch TiKV
|
||||
uses: shrink/actions-docker-extract@v1
|
||||
id: extract-tikv
|
||||
with:
|
||||
image: pingcap/tikv:nightly
|
||||
path: /tikv-server
|
||||
|
||||
- name: Run PD & TiKV
|
||||
run: |
|
||||
mv ../${{steps.extract-pd.outputs.destination}}/pd-server .
|
||||
mv ../${{steps.extract-tikv.outputs.destination}}/tikv-server .
|
||||
./pd-server > pd.log 2>&1 &
|
||||
sleep 5
|
||||
./tikv-server -C tikv.toml > tikv.log 2>&1 &
|
||||
sleep 15
|
||||
working-directory: integration_tests
|
||||
- name: Test
|
||||
run: go test -v --with-tikv=true --pd-addrs=127.0.0.1:2379
|
||||
working-directory: integration_tests
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
name: golangci-lint
|
||||
name: Lint
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
|
|
@ -6,20 +6,17 @@ on:
|
|||
pull_request:
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
|
||||
- name: Tidy
|
||||
run: go mod tidy
|
||||
|
||||
- name: golangci-lint
|
||||
- name: Lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
name: Go
|
||||
name: Unit Test
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -7,8 +7,7 @@ on:
|
|||
branches: [ v2 ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
@ -18,8 +17,5 @@ jobs:
|
|||
with:
|
||||
go-version: 1.16
|
||||
|
||||
- name: Tidy
|
||||
run: go mod tidy
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
[server]
|
||||
addr = "127.0.0.1:20160"
|
||||
[storage]
|
||||
reserve-space = "1MB"
|
||||
[pd]
|
||||
endpoints = ["127.0.0.1:2379"]
|
||||
[rocksdb]
|
||||
max-open-files = 10000
|
||||
[raftdb]
|
||||
max-open-files = 10000
|
||||
Loading…
Reference in New Issue