-
Notifications
You must be signed in to change notification settings - Fork 7
92 lines (76 loc) · 2.54 KB
/
Copy pathci.yml
File metadata and controls
92 lines (76 loc) · 2.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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