Add CI workflow (#23)
* Add CI workflow * Delete interop.yml * Delete test.yml * deny warnings * Fix unused mut
This commit is contained in:
@@ -0,0 +1,75 @@
|
|||||||
|
name: CI
|
||||||
|
on: [push]
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
rust: [beta]
|
||||||
|
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "-D warnings"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: hecrj/setup-rust-action@master
|
||||||
|
with:
|
||||||
|
rust-version: ${{ matrix.rust }}
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Install rustfmt
|
||||||
|
run: rustup component add rustfmt
|
||||||
|
- name: Check fmt
|
||||||
|
run: cargo fmt -- --check
|
||||||
|
- name: Check all
|
||||||
|
run: cargo check --all
|
||||||
|
- name: Check with no default features
|
||||||
|
run: cargo check -p tonic --no-default-features
|
||||||
|
- name: Check with transport no tls
|
||||||
|
run: cargo check -p tonic
|
||||||
|
- name: Check with transport w/ openssl
|
||||||
|
run: cargo check -p tonic --features openssl
|
||||||
|
- name: Check with transport w/ rustls
|
||||||
|
run: cargo check -p tonic --features rustls
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest]
|
||||||
|
rust: [beta]
|
||||||
|
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "-D warnings"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: hecrj/setup-rust-action@master
|
||||||
|
with:
|
||||||
|
rust-version: ${{ matrix.rust }}
|
||||||
|
- name: Install rustfmt
|
||||||
|
run: rustup component add rustfmt
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Run tests
|
||||||
|
run: cargo test --all --all-features
|
||||||
|
|
||||||
|
interop:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, macOS-latest]
|
||||||
|
rust: [beta]
|
||||||
|
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "-D warnings"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: hecrj/setup-rust-action@master
|
||||||
|
with:
|
||||||
|
rust-version: ${{ matrix.rust }}
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: Install rustfmt
|
||||||
|
run: rustup component add rustfmt
|
||||||
|
- name: Run interop tests
|
||||||
|
run: ./tonic-interop/test.sh
|
||||||
|
- name: Run interop tests with tls
|
||||||
|
run: ./tonic-interop/test.sh --use_tls
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
name: interop
|
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest, macOS-latest]
|
|
||||||
rust: [beta]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: hecrj/setup-rust-action@master
|
|
||||||
with:
|
|
||||||
rust-version: ${{ matrix.rust }}
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
- name: Install rustfmt
|
|
||||||
run: rustup component add rustfmt
|
|
||||||
- name: Run interop tests
|
|
||||||
run: ./tonic-interop/test.sh
|
|
||||||
- name: Run interop tests with tls
|
|
||||||
run: ./tonic-interop/test.sh --use_tls
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
name: test
|
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
rust: [beta]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: hecrj/setup-rust-action@master
|
|
||||||
with:
|
|
||||||
rust-version: ${{ matrix.rust }}
|
|
||||||
- uses: actions/checkout@master
|
|
||||||
- name: Install rustfmt
|
|
||||||
run: rustup component add rustfmt
|
|
||||||
- name: Check fmt
|
|
||||||
run: cargo fmt -- --check
|
|
||||||
- name: Check all
|
|
||||||
run: cargo check --all
|
|
||||||
- name: Check with no default features
|
|
||||||
run: cargo check -p tonic --no-default-features
|
|
||||||
- name: Check with transport no tls
|
|
||||||
run: cargo check -p tonic
|
|
||||||
- name: Check with transport w/ openssl
|
|
||||||
run: cargo check -p tonic --features openssl
|
|
||||||
- name: Check with transport w/ rustls
|
|
||||||
run: cargo check -p tonic --features rustls
|
|
||||||
- name: Run tests
|
|
||||||
run: cargo test --all --all-features
|
|
||||||
@@ -124,7 +124,7 @@ impl server::RouteGuide for RouteGuide {
|
|||||||
println!("RouteChat");
|
println!("RouteChat");
|
||||||
|
|
||||||
let stream = request.into_inner();
|
let stream = request.into_inner();
|
||||||
let mut state = self.state.clone();
|
let state = self.state.clone();
|
||||||
|
|
||||||
let output = async_stream::try_stream! {
|
let output = async_stream::try_stream! {
|
||||||
futures::pin_mut!(stream);
|
futures::pin_mut!(stream);
|
||||||
|
|||||||
Reference in New Issue
Block a user