-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (73 loc) · 2.14 KB
/
ci.yaml
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
name: build
on:
pull_request:
push:
branches:
- master
- dev
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
GRPCURLV: "1.8.1"
jobs:
lint:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt
- run: cargo +nightly fmt -- --config-path ./fmt/rustfmt.toml
- run: cargo clippy --all
test:
name: test
env:
# Emit backtraces on panics.
RUST_BACKTRACE: 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: install nextest
run: curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C /usr/local/bin
- run: cargo nextest run
examples:
name: examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: install grpcurl
run: sudo curl -sL "${{ env.GRPCURL_URL }}" | sudo tar xvz -C /usr/local/bin/
env:
GRPCURL_URL: "https://github.com/fullstorydev/grpcurl/releases/download/\
v${{ env.GRPCURLV }}/grpcurl_${{ env.GRPCURLV }}_linux_x86_64.tar.gz"
- name: record
run: |
cargo run -- record ./test_data post
cargo run -- record ./test_data grpc
- name: take
run: |
cargo run -- take ./test_data/post.01s.body.fr.json
- name: vrecord
run: |
cargo run -- vrecord ./test_data/post.vr.json
cargo run -- vrecord ./test_data/alt_post.vr.json