-
Notifications
You must be signed in to change notification settings - Fork 32
77 lines (74 loc) · 2.3 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: CI
on:
pull_request:
branches:
- master
workflow_dispatch:
# Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
dev:
name: Run fmt, clippy and check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: lukka/get-cmake@latest
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.GIT_ACTION_BOT }}
run: git config --global url."https://${TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Install `rust` toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-07-27-x86_64-unknown-linux-gnu
default: true
profile: minimal
components: clippy, rustfmt
- name: Run format
env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: "1"
LOG_LEVEL: INFO
EXTRA_CARGO_ARGS: --no-run
working-directory: ./
run: |
cargo fmt --check
- name: Run clippy
env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: "1"
LOG_LEVEL: INFO
EXTRA_CARGO_ARGS: --no-run
working-directory: ./
run: |
cargo clippy
- name: Run check
env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: "1"
LOG_LEVEL: INFO
EXTRA_CARGO_ARGS: --no-run
working-directory: ./
run: |
cargo check
- name: Setup tikv instance
run: |
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
/home/runner/.tiup/bin/tiup playground nightly --mode tikv-slim --without-monitor &
- name: Setup tidis
run: |
cargo build
./target/debug/tidis-server --config="config.toml" &
- name: Setup test tool env
uses: actions/setup-python@v3
with:
python-version: '3.x'
cache: 'pip'
- name: Setup test tool dependency
working-directory: test
run: pip install -r requirements.txt
- name: Run E2E test
working-directory: test
run: python test_helper.py --port 6666