add error handling to dht #617
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: Rust CI | |
on: | |
push: | |
branches: [ "*" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Switch rust version | |
run: rustup default nightly | |
- name: Update rust | |
run: rustup update | |
- name: Install protoc | |
run: sudo apt-get install -y protobuf-compiler | |
- name: Cargo update | |
run: cargo update --verbose | |
- name: Check | |
run: cargo check --verbose | |
- name: Test | |
run: cargo test | |
continue-on-error: true | |
- name: Build | |
run: cargo build --verbose | |
- name: Install required cargo | |
run: cargo install clippy-sarif sarif-fmt | |
- name: Add clippy | |
run: rustup component add clippy | |
- name: Add fmt | |
run: rustup component add rustfmt | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- name: Clippy | |
run: | |
cargo clippy | |
--all-features | |
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt | |
continue-on-error: true | |
- name: Upload analysis results to GitHub | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: rust-clippy-results.sarif | |
wait-for-processing: true |