Skip to content

chore(fast-pull,fast-steal): 整理代码 #62

chore(fast-pull,fast-steal): 整理代码

chore(fast-pull,fast-steal): 整理代码 #62

Workflow file for this run

name: Test
on: [push, pull_request]
permissions:
contents: read
jobs:
check:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
channel:
- stable
- beta
- nightly
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.channel }}
components: clippy
- name: Configure sccache-cache
uses: mozilla-actions/[email protected]
- name: Set Rust Caching Env
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
- name: Test
run: cargo test --workspace --all-features --all-targets --verbose
- name: Build
run: cargo build --workspace --all-features --all-targets --verbose
- name: Clippy
run: cargo clippy --workspace --all-features --all-targets --verbose -- -Dwarnings
check-minimal:
name: Check minimal versions
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
- name: Configure sccache-cache
uses: mozilla-actions/[email protected]
- name: Set Rust Caching Env
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
- name: Check minimal versions
run: cargo check --workspace --all-features --all-targets -Z minimal-versions
format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install latest stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
- name: Run rustfmt
run: cargo fmt --all --check