testing.yml (1071B)
1 name: Rust Testing 2 3 on: 4 pull_request: 5 push: 6 branches: [main] 7 workflow_dispatch: 8 workflow_call: 9 10 env: 11 CARGO_TERM_COLOR: always 12 13 jobs: 14 test: 15 name: Test 16 runs-on: ${{ matrix.os }} 17 needs: ["check"] 18 strategy: 19 matrix: 20 os: [ubuntu-latest, windows-latest] 21 steps: 22 - uses: actions/checkout@main 23 - name: Cache Rust dependencies 24 uses: Swatinem/rust-cache@master 25 - name: Test Build 26 run: cargo build --verbose 27 - name: Run tests 28 run: cargo test --verbose 29 30 check: 31 name: Rustfmt 32 runs-on: ubuntu-latest 33 steps: 34 - uses: actions/checkout@main 35 - name: Cache Rust dependencies 36 uses: Swatinem/rust-cache@master 37 - name: Install Rust fmt 38 run: rustup component add rustfmt 39 - name: Install Rust clippy 40 run: rustup component add clippy 41 - name: Run rustfmt 42 run: cargo fmt --all -- --check 43 - name: Run clippy 44 run: cargo clippy --all-targets --all-features -- -D warnings