Skip to content

feature/cli optimize #162

feature/cli optimize

feature/cli optimize #162

Workflow file for this run

#!#
# Copyright (c) 2025 Hangzhou Guanwaii Technology Co,.Ltd.
#
# This source code is licensed under the MIT License,
# which is located in the LICENSE file in the source tree's root directory.
#
# File: rust.yml
# Author: mingcheng ([email protected])
# File Created: 2025-03-05 11:10:40
#
# Modified By: mingcheng ([email protected])
# Last Modified: 2025-03-17 18:29:18
##
name: Cargo Build & Test
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build_and_test:
name: Rust project - latest
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustup component add clippy --toolchain ${{ matrix.toolchain }}
- run: rustup component add rustfmt --toolchain ${{ matrix.toolchain }}
- run: cargo clippy -- -D warnings
- run: cargo fmt --all -- --check
- run: cargo build --verbose
- run: cargo test --verbose