extension_ci: Use different target for nextest (#47738)

Release Notes:

- N/A
This commit is contained in:
Finn Evers authored and GitHub committed 2026-01-27 09:11:32 +00:00
1 parent 4ea3a839e1
commit 166eb1918a
3 files changed
+29 -6

No files matched your search

+1 -1
View File
@@ -76,7 +76,7 @@ jobs:
- name: steps::cargo_install_nextest
uses: taiki-e/install-action@nextest
- name: steps::cargo_nextest
run: cargo nextest run --workspace --no-fail-fast
run: 'cargo nextest run --workspace --no-fail-fast --target "$(rustc -vV | sed -n ''s|host: ||p'')"'
shell: bash -euxo pipefail {0}
env:
NEXTEST_NO_TESTS: warn
@@ -69,7 +69,10 @@ fn check_rust() -> NamedJob {
.add_step(run_clippy())
.add_step(steps::cargo_install_nextest())
.add_step(
steps::cargo_nextest(runners::Platform::Linux).add_env(("NEXTEST_NO_TESTS", "warn")),
steps::cargo_nextest(runners::Platform::Linux)
// Set the target to the current platform again
.with_target("$(rustc -vV | sed -n 's|host: ||p')")
.add_env(("NEXTEST_NO_TESTS", "warn")),
);
named::job(job)
+24 -4
View File
@@ -6,6 +6,30 @@ pub const BASH_SHELL: &str = "bash -euxo pipefail {0}";
// https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsshell
pub const PWSH_SHELL: &str = "pwsh";
pub(crate) struct Nextest(Step<Run>);
pub(crate) fn cargo_nextest(platform: Platform) -> Nextest {
Nextest(named::run(
platform,
"cargo nextest run --workspace --no-fail-fast",
))
}
impl Nextest {
pub(crate) fn with_target(mut self, target: &str) -> Step<Run> {
if let Some(nextest_command) = self.0.value.run.as_mut() {
nextest_command.push_str(&format!(r#" --target "{target}""#));
}
self.into()
}
}
impl From<Nextest> for Step<Run> {
fn from(value: Nextest) -> Self {
value.0
}
}
pub fn checkout_repo() -> Step<Use> {
named::uses(
"actions",
@@ -66,10 +90,6 @@ pub fn cargo_install_nextest() -> Step<Use> {
named::uses("taiki-e", "install-action", "nextest")
}
pub fn cargo_nextest(platform: Platform) -> Step<Run> {
named::run(platform, "cargo nextest run --workspace --no-fail-fast")
}
pub fn setup_cargo_config(platform: Platform) -> Step<Run> {
match platform {
Platform::Windows => named::pwsh(indoc::indoc! {r#"