This repository has been archived by the owner on Jul 1, 2023. It is now read-only.
Update README.md #314
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
on: [push, pull_request] | |
name: rust | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Protoc | |
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
# Caching | |
- name: Cache cargo registry | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/registry | |
key: cargo-registry-${{ hashFiles('Cargo.toml') }} | |
- name: Cache cargo index | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/git | |
key: cargo-index-${{ hashFiles('Cargo.toml') }} | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --manifest-path rust/Cargo.toml | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Protoc | |
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
# Caching | |
- name: Cache cargo registry | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/registry | |
key: cargo-registry-${{ hashFiles('Cargo.toml') }} | |
- name: Cache cargo index | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/git | |
key: cargo-index-${{ hashFiles('Cargo.toml') }} | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --manifest-path rust/Cargo.toml | |
fmt: | |
name: Rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- run: rustup component add rustfmt | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all --manifest-path rust/Cargo.toml -- --check | |
clippy: | |
name: Clippy | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- name: Install Protoc | |
uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- run: rustup component add clippy | |
# Caching | |
- name: Cache cargo registry | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/registry | |
key: cargo-registry-${{ hashFiles('Cargo.toml') }} | |
- name: Cache cargo index | |
uses: actions/cache@v1 | |
with: | |
path: ~/.cargo/git | |
key: cargo-index-${{ hashFiles('Cargo.toml') }} | |
- uses: actions-rs/cargo@v1 | |
continue-on-error: true | |
with: | |
command: clippy | |
args: --manifest-path rust/Cargo.toml -- -D warnings |