Skip to content

Commit 1e2a243

Browse files
committed
add matrix to CI
Signed-off-by: Ping Yu <[email protected]>
1 parent 0d6d0a0 commit 1e2a243

File tree

1 file changed

+12
-41
lines changed

1 file changed

+12
-41
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -33,50 +33,14 @@ jobs:
3333
- name: make check
3434
run: ${{ matrix.env }} make check
3535

36-
fmt:
37-
name: rustfmt
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: actions/checkout@v2
41-
- uses: actions-rs/toolchain@v1
42-
with:
43-
profile: minimal
44-
toolchain: nightly
45-
override: true
46-
- run: rustup component add rustfmt
47-
- uses: actions-rs/cargo@v1
48-
with:
49-
command: fmt
50-
args: --all -- --check
51-
52-
clippy:
53-
name: clippy
54-
runs-on: ubuntu-latest
55-
steps:
56-
- uses: actions/checkout@v2
57-
- uses: actions-rs/toolchain@v1
58-
with:
59-
toolchain: nightly
60-
components: clippy
61-
override: true
62-
- name: Install Protoc
63-
uses: arduino/setup-protoc@v1
64-
with:
65-
version: '3.x'
66-
repo-token: ${{ secrets.GITHUB_TOKEN }}
67-
- name: Rust Cache
68-
uses: Swatinem/[email protected]
69-
- uses: actions-rs/clippy-check@v1
70-
with:
71-
token: ${{ secrets.GITHUB_TOKEN }}
72-
args: --all-targets --all-features -- -D clippy::all
73-
name: Clippy Output
74-
7536
unit-test:
7637
name: unit test
7738
env:
7839
CARGO_INCREMENTAL: 0
7940
runs-on: ubuntu-latest
41+
strategy:
42+
matrix:
43+
env: [ '', 'RUST_PROTOBUF=1' ]
8044
steps:
8145
- uses: actions/checkout@v2
8246
- uses: actions-rs/toolchain@v1
@@ -91,14 +55,19 @@ jobs:
9155
repo-token: ${{ secrets.GITHUB_TOKEN }}
9256
- name: Rust Cache
9357
uses: Swatinem/[email protected]
58+
with:
59+
key: ${{ matrix.env }}
9460
- name: unit test
95-
run: make unit-test
61+
run: ${{ matrix.env }} make unit-test
9662

9763
integration-test:
9864
name: integration test
9965
env:
10066
CARGO_INCREMENTAL: 0
10167
runs-on: ubuntu-latest
68+
strategy:
69+
matrix:
70+
env: [ '', 'RUST_PROTOBUF=1' ]
10271
steps:
10372
- uses: actions/checkout@v2
10473
- uses: actions-rs/toolchain@v1
@@ -113,6 +82,8 @@ jobs:
11382
repo-token: ${{ secrets.GITHUB_TOKEN }}
11483
- name: Rust Cache
11584
uses: Swatinem/[email protected]
85+
with:
86+
key: ${{ matrix.env }}
11687
- name: install tiup
11788
run: curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
11889
- name: start tiup playground
@@ -125,4 +96,4 @@ jobs:
12596
sleep 1
12697
done
12798
- name: integration test
128-
run: MULTI_REGION=1 make integration-test
99+
run: ${{ matrix.env }} MULTI_REGION=1 make integration-test

0 commit comments

Comments
 (0)