Skip to content

Fix Windows CI: serialize tests to avoid git/cargo race conditions #12

Fix Windows CI: serialize tests to avoid git/cargo race conditions

Fix Windows CI: serialize tests to avoid git/cargo race conditions #12

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test (${{ matrix.os }}, ${{ matrix.rust }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable, "1.85"]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo build --workspace
- name: Run tests
run: cargo test --workspace
if: runner.os != 'Windows'
- name: Run tests (Windows, serialized to avoid git/cargo race conditions)
run: cargo test --workspace -- --test-threads=1
if: runner.os == 'Windows'
- run: cargo clippy --workspace -- -D warnings
if: matrix.rust == 'stable'
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check