Skip to content

[close #421] [br-release-1.0] br: Split for smaller batch of keys (#4… #316

[close #421] [br-release-1.0] br: Split for smaller batch of keys (#4…

[close #421] [br-release-1.0] br: Split for smaller batch of keys (#4… #316

Workflow file for this run

name: TiKV-BR
on:
push:
branches:
- main
- br-release-*
paths: br/**
pull_request:
branches:
- main
- br-release-*
paths: br/**
permissions:
contents: read
jobs:
br-check-tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.1'
- name: make check/tidy
shell: bash
run: |
cd br
make check/tidy
br-check-golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.1'
- name: make check/golangci-lint
shell: bash
run: |
cd br
make check/golangci-lint
br-check-gosec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.1'
- name: make check/gosec
shell: bash
run: |
cd br
make check/gosec
br-unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.1'
- name: make test
shell: bash
run: |
cd br
make test
br-integration-test:
name: br-integration-test-${{ matrix.tikv_version }}-apiv${{ matrix.api_version }}
runs-on: ubuntu-latest
strategy:
matrix:
tikv_version: [v6.5.3]
api_version: [1, 2]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.18.1'
- name: install tiup
run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
- name: start tikv cluster
run: |
# start tikv
echo -e "\napi-version = ${{ matrix.api_version }}\n" >> /home/runner/work/migration/migration/.github/config/br_rawkv.toml
/home/runner/.tiup/bin/tiup playground ${{ matrix.tikv_version }} --mode tikv-slim --kv 1 --without-monitor --kv.config /home/runner/work/migration/migration/.github/config/br_rawkv.toml --pd.port 2379 --pd.config /home/runner/work/migration/migration/.github/config/br_pd.toml &> raw.out 2>&1 &
# The first run of `tiup` has to download all components so it'll take longer.
timeout 180 tail -f raw.out | grep -q 'PD Endpoints'
if [ $? -ne 0 ]; then
echo "Failed to start TiKV cluster"
exit 1
fi
echo "PD_ADDR=127.0.0.1:2379" >> $GITHUB_ENV
# Output the api version
echo "API_VERSION=${{ matrix.api_version }}" >> $GITHUB_ENV
# Log the output
echo "$(cat raw.out)" >&2
- name: run integration test
run: |
cd br
make test/integration
- name: display backup log
run: |
cat /tmp/br.log*
# comments low version CI as they fail without checksum & split region capability.
# Plan to support low version with feature gate in the future.
# br-integration-test-5X:
# # Separate integration tests of v5.X, to distinguish whether failure would be caused by compatibility of old versions.
# name: br-integration-test-5X-${{ matrix.tikv_version }}
# runs-on: ubuntu-latest
# strategy:
# matrix:
# tikv_version: [v5.0.0, v5.1.0, v5.2.0, v5.3.0, v5.4.0, v6.0.0]
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-go@v2
# with:
# go-version: '1.18.1'
# - name: install tiup
# run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
# - name: start tikv cluster
# run: |
# # start tikv in apiv1ttl
# /home/runner/.tiup/bin/tiup playground ${{ matrix.tikv_version }} --mode tikv-slim --kv 1 --without-monitor --kv.config /home/runner/work/migration/migration/.github/config/br_rawkv.toml --pd.config /home/runner/work/migration/migration/.github/config/br_pd.toml &> raw.out 2>&1 &
# # The first run of `tiup` has to download all components so it'll take longer.
# sleep 1m 30s
# # Parse PD address from `tiup` output
# echo "PD_ADDR=$(cat raw.out | grep -oP '(?<=PD client endpoints: \[)[0-9\.:]+(?=\])')" >> $GITHUB_ENV
# # Log the output
# echo "$(cat raw.out)" >&2
# - name: run integration test
# run: |
# cd br
# make test/integration