feat: add storage argument #104
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: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 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 -- -D warnings | |
- name: Build image | |
run: | | |
make minikube-docker | |
- name: Run tests | |
run: cargo test --verbose --workspace | |