forked from aserebryakov/trie-rs
-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (74 loc) · 1.96 KB
/
test.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
78
79
80
81
82
83
84
name: Tests
on:
workflow_dispatch:
workflow_call:
push:
branches: [ main ]
pull_request:
jobs:
clippy:
name: 📎 fmt and clippy
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- run: |
rustup update
rustup toolchain install nightly
rustup default nightly
rustup component add clippy rustfmt
- run: cargo fmt -- --check
- run: cargo clippy --all --all-targets --all-features
test:
name: 🧪 Tests
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- run: cargo build --all-features
- run: cargo doc
- run: cargo test --all-features
env:
RUST_BACKTRACE: 1
cov:
name: ☂️ Coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v4
- name: Generate code coverage
run: cargo tarpaulin -p ptrie --doc --tests --out xml --all-features
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
token: ${{secrets.CODECOV_TOKEN}}
benchmark:
name: ⏱️ Benchmark
runs-on: ubuntu-latest
steps:
- run: |
rustup update
rustup toolchain install nightly
rustup default nightly
rustup component add clippy rustfmt
- name: Checkout commit last release
uses: actions/checkout@v4
with:
ref: b0bf31a097a3099ddbebd801154c8929525894ae
fetch-depth: 0
- name: Run benchmarks on previous commit
run: |
cargo bench
git checkout main
- name: Run benchmarks
run: cargo bench
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark
path: target/criterion/