Merge develop into master #20
This file contains hidden or 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: Test | |
| on: | |
| push: | |
| branches: [ master, develop ] | |
| pull_request: | |
| branches: [ master, develop ] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| jobs: | |
| test: | |
| name: Test on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| rust: [stable] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ matrix.rust }} | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run tests | |
| run: | | |
| cargo test --verbose --features test-env | |
| - name: Run clippy | |
| run: | | |
| cargo clippy --all-features -- -D warnings | |
| - name: Check formatting | |
| run: | | |
| cargo fmt --all -- --check | |
| - name: Test summary | |
| run: | | |
| echo "## Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Platform: ${{ runner.os }}" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Rust: ${{ matrix.rust }}" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Tests passed" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Clippy checks passed" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Format checks passed" >> $GITHUB_STEP_SUMMARY |