We didn't actually need the CI flag after all; just #[ignore] the static tests for all Rust versions except beta.
This commit is contained in:
parent
b6fbffedc3
commit
46aa3a3284
@ -42,7 +42,7 @@ addons:
|
||||
- g++-4.8
|
||||
|
||||
script: |
|
||||
cargo test --release --features=ci -- --nocapture
|
||||
cargo test --release -- --nocapture
|
||||
|
||||
jobs:
|
||||
include:
|
||||
|
||||
@ -34,9 +34,6 @@ legacy-runtime = ["neon-runtime/neon-sys", "neon-build/neon-sys"]
|
||||
# is disabled by default.
|
||||
napi-runtime = ["neon-runtime/nodejs-sys"]
|
||||
|
||||
# Enabled by CI configs to allow selective enabling/disabling of tests in CI.
|
||||
ci = []
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
"crates/neon-build",
|
||||
|
||||
@ -40,7 +40,7 @@ install:
|
||||
build: false
|
||||
|
||||
test_script:
|
||||
- cargo test -vv --release --features=ci static -- --nocapture
|
||||
- cargo test --release
|
||||
|
||||
cache:
|
||||
- target
|
||||
|
||||
3
build.rs
3
build.rs
@ -2,9 +2,6 @@ use std::env;
|
||||
|
||||
fn main() {
|
||||
if let Ok(profile) = env::var("PROFILE") {
|
||||
eprintln!("neon/build.rs: setting neon_profile={}", profile);
|
||||
println!("cargo:rustc-cfg=neon_profile={:?}", profile);
|
||||
} else {
|
||||
eprintln!("neon/build.rs: NOT setting neon_proifle");
|
||||
}
|
||||
}
|
||||
|
||||
10
src/lib.rs
10
src/lib.rs
@ -411,16 +411,16 @@ mod tests {
|
||||
run("cargo test --release", &project_root().join("test").join("static"));
|
||||
}
|
||||
|
||||
// In CI, we'll only run the static tests in Beta. This will catch changes to
|
||||
// error reporting and any associated usability regressions before a new Rust
|
||||
// version is released, but will have more stable results than Nightly.
|
||||
#[cfg(feature = "ci")]
|
||||
// Only run the static tests in Beta. This will catch changes to error reporting
|
||||
// and any associated usability regressions before a new Rust version is shipped
|
||||
// but will have more stable results than Nightly.
|
||||
#[rustversion::beta]
|
||||
#[test]
|
||||
fn static_test() { static_test_impl() }
|
||||
|
||||
#[cfg(not(feature = "ci"))]
|
||||
#[rustversion::not(beta)]
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn static_test() { static_test_impl() }
|
||||
|
||||
#[test]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user