Update main.rs #18
Workflow file for this run
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: Build and Test Nimble | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
env: | |
RUST_VERSION: 1.65.0 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install protoc | |
run: sudo apt install -y protobuf-compiler | |
- uses: actions/checkout@v2 | |
- name: Install | |
run: rustup install ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }} | |
- name: Install rustfmt Components | |
run: rustup component add rustfmt | |
- name: Install clippy | |
run: rustup component add clippy | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Check Rustfmt Code Style | |
run: cargo fmt --all -- --check | |
- name: Check clippy warnings | |
run: cargo clippy --all-targets --all-features -- -D warnings |