Merge pull request #28 from Fluxie/topic/rust-grpc #102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- ci | |
jobs: | |
test: | |
name: Tests | |
env: | |
RUST_BACKTRACE: 1 | |
TERM: xterm | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-2019 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v2 | |
- name: Environment | |
run: | | |
cargo --version | |
rustc --version | |
protoc --version | |
- name: Build | |
run: | | |
cargo build | |
cargo build --manifest-path ./test/rust_grpc/Cargo.toml | |
- name: Tests | |
shell: bash | |
run: | | |
cd test | |
cargo test --manifest-path ./rust_grpc/Cargo.toml | |
./test_script.sh | |
style: | |
name: Fmt & Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
override: true | |
components: rustfmt, clippy | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v2 | |
- name: Environment | |
run: | | |
cargo --version | |
cargo fmt -- --version | |
cargo clippy -- --version | |
protoc --version | |
- name: Run rustfmt | |
run: | | |
cargo fmt --all -- --check | |
- name: Run clippy | |
run: | | |
cargo clippy --all -- -D warnings |