-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Andy Lok <[email protected]>
- Loading branch information
1 parent
3cde9f0
commit bbf9e19
Showing
8 changed files
with
109 additions
and
16 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# PD Configuration. | ||
[replication] | ||
enable-placement-rules = true | ||
max-replicas = 1 | ||
max-replicas = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# TiKV Configuration. | ||
|
||
[raftstore] | ||
# set store capacity, if no set, use disk capacity. | ||
capacity = "8G" | ||
pd-heartbeat-tick-interval = "2s" | ||
pd-store-heartbeat-tick-interval = "5s" | ||
split-region-check-tick-interval = "1s" | ||
|
||
[storage] | ||
enable-ttl = true | ||
|
||
[rocksdb] | ||
max-open-files = 10000 | ||
|
||
[raftdb] | ||
max-open-files = 10000 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# TiKV Configuration. | ||
|
||
[raftstore] | ||
# set store capacity, if no set, use disk capacity. | ||
capacity = "8G" | ||
pd-heartbeat-tick-interval = "2s" | ||
pd-store-heartbeat-tick-interval = "5s" | ||
split-region-check-tick-interval = "1s" | ||
|
||
[rocksdb] | ||
max-open-files = 10000 | ||
|
||
[raftdb] | ||
max-open-files = 10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
format: | ||
name: Check Format | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '8.0' | ||
distribution: 'adopt' | ||
- run: | | ||
./dev/javafmt | ||
if [[ $(git diff) != "" ]] | ||
then | ||
echo "code format error, please run the following commands:" | ||
echo " ./dev/javafmt" | ||
exit 1 | ||
fi | ||
integration-test: | ||
name: Integration Test - ${{ matrix.tikv_version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
tikv_version: [nightly, v5.0.4, v5.3.0, v5.4.0] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '8.0' | ||
distribution: 'adopt' | ||
- name: Install TiUP | ||
run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh | ||
- name: Start TiUP Playground | ||
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/client-java/client-java/.github/config/tikv_rawkv.toml --pd.config /home/runner/work/client-java/client-java/.github/config/pd.toml &> raw.out 2>&1 & | ||
# The first run of `tiup` has to download all components so it'll take longer. | ||
sleep 1m 30s | ||
# Start TiKV in APIV1 | ||
/home/runner/.tiup/bin/tiup playground ${{ matrix.tikv_version }} --mode tikv-slim --kv 1 --without-monitor --kv.config /home/runner/work/client-java/client-java/.github/config/tikv_txnkv.toml --pd.config /home/runner/work/client-java/client-java/.github/config/pd.toml &> txn.out 2>&1 & | ||
sleep 30s | ||
# Parse PD address from `tiup` output | ||
echo "RAWKV_PD_ADDRESSES=$(cat raw.out | grep -oP '(?<=PD client endpoints: \[)[0-9\.:]+(?=\])')" >> $GITHUB_ENV | ||
echo "TXNKV_PD_ADDRESSES=$(cat txn.out | grep -oP '(?<=PD client endpoints: \[)[0-9\.:]+(?=\])')" >> $GITHUB_ENV | ||
# Log the output | ||
echo "$(cat raw.out)" >&2 | ||
echo "$(cat txn.out)" >&2 | ||
- name: Run Integration Test | ||
run: mvn clean test | ||
- name: Upload coverage | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
files: ${{ github.workspace }}/target/site/jacoco/jacoco.xml | ||
fail_ci_if_error: true | ||
verbose: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters