fix(storage): avoid git sync temp path collisions (#248) #761
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: CI | |
| on: | |
| pull_request: | |
| types: [opened, ready_for_review, synchronize] | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - uses: pre-commit/action@v3.0.1 | |
| version-consistency: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check version is consistent across all files | |
| run: ./scripts/check-version-consistency.sh | |
| test: | |
| needs: pre-commit | |
| strategy: | |
| matrix: | |
| include: | |
| - feature_flags: "--no-default-features" | |
| name: "minimal" | |
| - feature_flags: "--no-default-features --features git" | |
| name: "git-only" | |
| - feature_flags: "" | |
| name: "default" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check Cargo.lock is up to date | |
| run: cargo check --locked | |
| - name: build (${{ matrix.name }}) | |
| run: cargo build --locked --all --verbose ${{ matrix.feature_flags }} | |
| - name: test (${{ matrix.name }}) | |
| run: cargo test --locked --verbose ${{ matrix.feature_flags }} | |
| # Re-run the tests that share process-global state (CWD, git config, on-disk | |
| # prolly files) several times under parallel execution. Without this, flaky | |
| # tree/merge bugs that depend on non-deterministic HashMap ordering (e.g. | |
| # reload insertion order, stale pivots after delete) can slip through a | |
| # single lucky run — as happened before the GH-161/162 follow-up fix. | |
| - name: test stress — versioned_store (${{ matrix.name }}) | |
| run: | | |
| set -e | |
| for attempt in 1 2 3 4 5; do | |
| echo "::group::versioned_store attempt $attempt" | |
| cargo test --locked ${{ matrix.feature_flags }} --lib versioned_store | |
| echo "::endgroup::" | |
| done | |
| - name: clippy (${{ matrix.name }}) | |
| run: cargo clippy --locked --all ${{ matrix.feature_flags }} -- -D warnings | |
| clippy-all-features: | |
| needs: pre-commit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: clippy (all features) | |
| run: cargo clippy --locked --all --all-features -- -D warnings | |
| docs: | |
| needs: pre-commit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: build benchmarks | |
| run: cargo test --locked --benches --no-run --verbose | |
| - name: docs | |
| run: cargo doc --locked --document-private-items --no-deps |