Skip to content

Update CI setup

Update CI setup #83

Workflow file for this run

name: build
on:
pull_request:
push:
branches:
- master
- dev
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:
mkdir -p ~/.cargo/bin
curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C "${CARGO_HOME:-~/.cargo}/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
env:
GRPCURL_URL: "https://github.com/fullstorydev/grpcurl/releases/download/\
v${{ env.GRPCURLV }}/grpcurl_${{ env.GRPCURLV }}_linux_x86_64.tar.gz"
run: sudo curl -sL "$GRPCURL_URL" sudo tar xvz -C /usr/local/bin/
- 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