Skip to content

fix: clippy

fix: clippy #72

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Check failure on line 19 in .github/workflows/rust.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/rust.yml

Invalid workflow file

You have an error in your yaml syntax on line 19
- name: Install git
run: |
sudo apt update
sudo apt install git
- name: Create mongo Docker container
uses: DigiPie/[email protected]
with:
image_version: latest
port: 27017
- name: Install mongosh command
run: |
sudo apt-get update
sudo apt-get install -y wget gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt-get update
sudo apt-get install -y mongodb-mongosh
- name: Test mongo connection
run: "sudo mongosh localhost:27017"
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy rustfmt
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Start minikube
uses: medyagh/setup-minikube@latest
- name: Enabel plugin
run: |
eval $(minikube -p minikube docker-env)
alias kubectl="minikube kubectl --"
minikube addons enable metrics-server
- name: Install Helm
uses: azure/[email protected]
id: install
- name: Install StorageClass
run: |
kubectl apply -f ./script/local-storageclass.yaml
kubectl -n local-path-storage get storageclass
- name: Run Clippy
run: |
rustup show
cargo clippy --workspace --exclude jiaozifs_client_rs
- name: Build image
run: |
make minikube-docker
- name: Run tests
run: cargo test --verbose --workspace