fix flag usage in Dockerfile #43
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: Rust | |
on: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
branches: [ master ] | |
paths-ignore: | |
- "**.md" | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
lints: | |
name: Cargo check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Crates and build cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
# We want to update the cache at each run | |
key: rust-${{ runner.os }}-${{ github.run_id }} | |
# But we will utilize old ones as well | |
# (hopefully won't pile up) | |
restore-keys: rust-${{ runner.os }}- | |
- name: Check formatting | |
run: cargo fmt --all --verbose --check | |
- name: Install protocol buffer compiler | |
run: sudo apt install -y protobuf-compiler | |
- run: cargo check | |
- name: Clippy | |
run: cargo clippy --features console-log,file-log --fix -- -D warnings | |
- name: Documentation build | |
run: cargo doc --no-deps --workspace | |
tests: | |
name: Rust tests | |
runs-on: ubuntu-latest | |
needs: [lints] | |
steps: | |
- uses: actions/checkout@v3 | |
- run: cargo test |