Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mkatychev committed Mar 26, 2024
1 parent 3a9c33e commit dca3c6c
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 25 deletions.
34 changes: 11 additions & 23 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@ on:
- dev
env:
CARGO_TERM_COLOR: always
GRPCURLV: "1.8.1"
jobs:
rustfmt:
lint:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with: # use nightly rustfmt rules
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
override: true
profile: minimal
components: rustfmt
# from stable toolchain:
# cargo +nightly fmt --all
- run: cargo fmt --all -- --check
- run: cargo clippy --all
test:
name: test
env:
Expand All @@ -40,7 +42,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
Expand All @@ -50,9 +52,9 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: install grpcurl
run: |
sudo curl -sL https://github.com/fullstorydev/grpcurl/releases/download/v1.8.1/grpcurl_1.8.1_linux_x86_64.tar.gz | sudo tar xvz -C /usr/local/bin/
sudo chmod +x /usr/local/bin/grpcurl
env:
GRPCURL_URL: "https://github.com/fullstorydev/grpcurl/releases/download/\
v${GRPCURLV}/grpcurl_${GRPCURLV}_linux_x86_64.tar.gz"
- name: httpbin post
run: cargo run -- record ./test_data post
- name: httpbin take
Expand All @@ -63,17 +65,3 @@ jobs:
run: cargo run -- vrecord ./test_data/alt_post.vr.json
- name: grpcbin headers
run: cargo run -- record ./test_data grpc
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: clippy
- run: cargo clippy --all
10 changes: 10 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,13 @@ fmt:
# Run clippy fix and rustfmt afterwards
fix *args: && fmt
cd {{ invocation_directory() }}; cargo clippy --fix --all-targets --all-features {{ args }}

integration:
cargo run -- record ./test_data grpc
cargo run -- record ./test_data post
cargo run -- take ./test_data/post.01s.body.fr.json
cargo run -- vrecord ./test_data/alt_post.vr.json
cargo run -- vrecord ./test_data/post.vr.json

record reel:
cargo run -- record ./test_data {{reel}}
2 changes: 1 addition & 1 deletion test_data/grpc.cut.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ADDRESS": "grpcb.in:9000"
"ADDRESS": "grpcbin.test.k6.io:9000"
}
2 changes: 1 addition & 1 deletion test_data/grpc.vr.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"grpc.02s.string_header.fr.json"
],
"cut": {
"ADDRESS": "grpcb.in:9001"
"ADDRESS": "grpcbin.test.k6.io:8080"
}
}

0 comments on commit dca3c6c

Please sign in to comment.