Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI workflow #23

Merged
merged 5 commits into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -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

21 changes: 0 additions & 21 deletions .github/workflows/interop.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/test.yml

This file was deleted.

2 changes: 1 addition & 1 deletion tonic-examples/src/routeguide/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl server::RouteGuide for RouteGuide {
println!("RouteChat");

let stream = request.into_inner();
let mut state = self.state.clone();
let state = self.state.clone();

let output = async_stream::try_stream! {
futures::pin_mut!(stream);
Expand Down