Skip to content

Commit 1c10afe

Browse files
authored
CI - Move the git diff check under cargo ci smoketests (#4854)
# Description of Changes To make `cargo ci` more properly the full test logic. # API and ABI breaking changes <!-- If this is an API or ABI breaking change, please apply the corresponding GitHub label. --> # Expected complexity level and risk 1 # Testing honestly none --------- Co-authored-by: Zeke Foppa <bfops@users.noreply.github.com>
1 parent 0cbf4dc commit 1c10afe

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,6 @@ jobs:
171171
}
172172
cargo ci smoketests -- --test-threads=1
173173
174-
- name: Check for changes
175-
run: |
176-
tools/check-diff.sh crates/smoketests || {
177-
echo 'Error: There is a diff in the smoketests directory.'
178-
exit 1
179-
}
180-
181174
test:
182175
needs: [lints]
183176
name: Test Suite

tools/ci/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ fn main() -> Result<()> {
535535
}
536536

537537
Some(CiCmd::Smoketests(args)) => {
538+
ensure_repo_root()?;
538539
smoketest::run(args)?;
539540
}
540541

tools/ci/src/smoketest.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ fn run_smoketest(server: Option<String>, dotnet: bool, args: Vec<String>) -> Res
179179
let status = cmd.args(&args).status()?;
180180

181181
ensure!(status.success(), "Tests failed");
182+
let diff_status = cmd!("bash", "tools/check-diff.sh", "crates/smoketests").run()?;
183+
ensure!(
184+
diff_status.status.success(),
185+
"There is a diff in the smoketests directory."
186+
);
182187
Ok(())
183188
}
184189

0 commit comments

Comments
 (0)