Skip to content

Commit d221376

Browse files
ci(test): use cargo nextest to speed up the test (#30)
* ci(test): use cargo nextest to speed up the test * ci: separate test to doc-test and nextest * fix(ci/test): slow down the test speed * fix(ci): slow down the bitmex tests * Formatted ci.yml Co-authored-by: Frank Dai <[email protected]>
1 parent 96d7126 commit d221376

File tree

2 files changed

+67
-64
lines changed

2 files changed

+67
-64
lines changed

.config/nextest.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[profile.default]
2+
slow-timeout = { period = "60s", terminate-after = 2 }
3+
fail-fast = false

.github/workflows/ci.yml

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -3,69 +3,69 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
build:
7-
name: Cargo build
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions-rs/toolchain@v1
12-
with:
13-
toolchain: nightly
14-
override: true
15-
- uses: actions-rs/cargo@v1
16-
with:
17-
command: build
18-
args: --release --all-features
19-
test:
20-
name: Cargo test
21-
runs-on: ubuntu-latest
22-
steps:
23-
- uses: actions/checkout@v2
24-
- uses: actions-rs/toolchain@v1
25-
with:
26-
toolchain: nightly
27-
override: true
28-
- uses: actions-rs/cargo@v1
29-
with:
30-
command: test
31-
fmt:
32-
name: Cargo fmt
33-
runs-on: ubuntu-latest
34-
steps:
35-
- uses: actions/checkout@v2
36-
- uses: actions-rs/toolchain@v1
37-
with:
38-
toolchain: nightly
39-
override: true
40-
components: rustfmt
41-
- uses: actions-rs/cargo@v1
42-
with:
43-
command: fmt
44-
args: -- --check
6+
build:
7+
name: Cargo build
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: actions-rs/toolchain@v1
12+
with:
13+
toolchain: nightly
14+
override: true
15+
- uses: actions-rs/cargo@v1
16+
with:
17+
command: build
18+
args: --release --all-features
19+
test:
20+
name: Cargo test
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions-rs/toolchain@v1
25+
with:
26+
toolchain: nightly
27+
override: true
28+
- uses: actions-rs/cargo@v1
29+
with:
30+
command: test
31+
fmt:
32+
name: Cargo fmt
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v2
36+
- uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: nightly
39+
override: true
40+
components: rustfmt
41+
- uses: actions-rs/cargo@v1
42+
with:
43+
command: fmt
44+
args: -- --check
4545

46-
check:
47-
name: Cargo check
48-
runs-on: ubuntu-latest
49-
steps:
50-
- uses: actions/checkout@v2
51-
- uses: actions-rs/toolchain@v1
52-
with:
53-
toolchain: nightly
54-
override: true
55-
- uses: actions-rs/cargo@v1
56-
with:
57-
command: check
46+
check:
47+
name: Cargo check
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v2
51+
- uses: actions-rs/toolchain@v1
52+
with:
53+
toolchain: nightly
54+
override: true
55+
- uses: actions-rs/cargo@v1
56+
with:
57+
command: check
5858

59-
clippy:
60-
name: Cargo clippy
61-
runs-on: ubuntu-latest
62-
steps:
63-
- uses: actions/checkout@v2
64-
- uses: actions-rs/toolchain@v1
65-
with:
66-
toolchain: nightly
67-
override: true
68-
components: clippy
69-
- uses: actions-rs/cargo@v1
70-
with:
71-
command: clippy
59+
clippy:
60+
name: Cargo clippy
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v2
64+
- uses: actions-rs/toolchain@v1
65+
with:
66+
toolchain: nightly
67+
override: true
68+
components: clippy
69+
- uses: actions-rs/cargo@v1
70+
with:
71+
command: clippy

0 commit comments

Comments
 (0)