File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 RMS_TEST_SHARD : ${{ matrix.shard }}
2222 steps :
2323 - uses : actions/checkout@v4
24+ with :
25+ fetch-depth : 0
2426 - uses : dtolnay/rust-toolchain@stable
2527 - uses : actions/setup-python@v5
2628 with :
5860 CARGO_BUILD_JOBS : " 2"
5961 steps :
6062 - uses : actions/checkout@v4
63+ with :
64+ fetch-depth : 0
6165 - uses : dtolnay/rust-toolchain@stable
6266 - uses : actions/setup-python@v5
6367 with :
9296 shell : pwsh
9397 run : git config --global core.longpaths true
9498 - uses : actions/checkout@v4
99+ with :
100+ fetch-depth : 0
95101 - uses : dtolnay/rust-toolchain@stable
96102 - name : Cross-platform behavioral-contract corpus
97103 run : cargo test -p rms --locked behavioral_contract::tests
@@ -107,6 +113,8 @@ jobs:
107113 runs-on : ubuntu-latest
108114 steps :
109115 - uses : actions/checkout@v4
116+ with :
117+ fetch-depth : 0
110118 - uses : dtolnay/rust-toolchain@stable
111119 - uses : actions/setup-python@v5
112120 with :
Original file line number Diff line number Diff line change 1414 runs-on : ubuntu-latest
1515 steps :
1616 - uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
1719 - uses : dtolnay/rust-toolchain@stable
1820 - name : Check tag version
1921 run : |
4547 runs-on : ubuntu-latest
4648 steps :
4749 - uses : actions/checkout@v4
50+ with :
51+ fetch-depth : 0
4852 - uses : dtolnay/rust-toolchain@stable
4953 - name : Package source crate
5054 run : |
7680 shell : pwsh
7781 run : git config --global core.longpaths true
7882 - uses : actions/checkout@v4
83+ with :
84+ fetch-depth : 0
7985 - uses : dtolnay/rust-toolchain@stable
8086 - name : Build release binary
8187 run : cargo build --release -p rms --locked
@@ -115,6 +121,8 @@ jobs:
115121 runs-on : ubuntu-latest
116122 steps :
117123 - uses : actions/checkout@v4
124+ with :
125+ fetch-depth : 0
118126 - uses : actions/download-artifact@v4
119127 with :
120128 path : dist
Original file line number Diff line number Diff line change @@ -152,6 +152,32 @@ fn repository_root() -> PathBuf {
152152 . to_path_buf ( )
153153}
154154
155+ #[ test]
156+ fn ci_workflows_fetch_complete_provenance_history ( ) {
157+ for file in [ ".github/workflows/ci.yml" , ".github/workflows/release.yml" ] {
158+ let workflow: serde_yaml:: Value =
159+ serde_yaml:: from_str ( & fs:: read_to_string ( repository_root ( ) . join ( file) ) . unwrap ( ) )
160+ . unwrap ( ) ;
161+ let mut checkouts = 0 ;
162+ for job in workflow[ "jobs" ] . as_mapping ( ) . unwrap ( ) . values ( ) {
163+ for step in job[ "steps" ] . as_sequence ( ) . unwrap ( ) {
164+ if step[ "uses" ]
165+ . as_str ( )
166+ . is_some_and ( |value| value. starts_with ( "actions/checkout@" ) )
167+ {
168+ checkouts += 1 ;
169+ assert_eq ! (
170+ step[ "with" ] [ "fetch-depth" ] . as_u64( ) ,
171+ Some ( 0 ) ,
172+ "{file}: retirement provenance requires full Git history"
173+ ) ;
174+ }
175+ }
176+ }
177+ assert ! ( checkouts > 0 , "{file}: no checkout found" ) ;
178+ }
179+ }
180+
155181fn run_probe ( arguments : & [ & str ] ) -> Output {
156182 Command :: new ( env ! ( "CARGO_BIN_EXE_rms" ) )
157183 . current_dir ( repository_root ( ) )
You can’t perform that action at this time.
0 commit comments