Skip to content

Add ttl for raw client #458

Add ttl for raw client

Add ttl for raw client #458

Workflow file for this run

on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
name: CI
jobs:
check:
name: check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: make check
run: make check
- name: Catch unexpected changes in the generated code
run: |
git diff --exit-code
unit-test:
name: unit test
env:
CARGO_INCREMENTAL: 0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: unit test
run: make unit-test
# TODO: Integeration test are split into two jobs because APIV2 is not implemented yet,
# so we can't run both tests in the same cluster.
# Once APIV2 is implemented, we can run both tests in the same cluster.
raw-integration-test:
name: integration test
env:
CARGO_INCREMENTAL: 0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: install tiup
run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
- name: start tiup playground
run: |
# use latest stable version
~/.tiup/bin/tiup install tikv pd
make tiup-v1ttl
while :; do
echo "waiting cluster to be ready"
[[ "$(curl -I http://127.0.0.1:2379/pd/api/v1/regions 2>/dev/null | head -n 1 | cut -d$' ' -f2)" -ne "405" ]] || break
sleep 1
done
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: integration test
run: MULTI_REGION=1 make raw-integration-test
txn-integration-test:
name: integration test
env:
CARGO_INCREMENTAL: 0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: install tiup
run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
- name: start tiup playground
run: |
# use latest stable version
~/.tiup/bin/tiup install tikv pd
make tiup
while :; do
echo "waiting cluster to be ready"
[[ "$(curl -I http://127.0.0.1:2379/pd/api/v1/regions 2>/dev/null | head -n 1 | cut -d$' ' -f2)" -ne "405" ]] || break
sleep 1
done
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: integration test
run: MULTI_REGION=1 make txn-integration-test