Skip to content

add rest service

add rest service #21

Workflow file for this run

name: Rust
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build:
permissions:
contents: read
security-events: write
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install protoc
uses: arduino/setup-protoc@v3
- name: Apply caching
uses: swatinem/rust-cache@v2
- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt
- name: Build with cargo
run: cargo build --verbose
- name: Run tests with cargo
run: cargo test --verbose --all-features
- name: Check format
run: cargo fmt --check
- name: Perform linting
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
- name: Perform audit
run: cargo audit