ci: Add the __ci feature

This commit is contained in:
Kévin Commaille 2022-02-11 22:17:49 +01:00
parent 4845594c05
commit acba6fbbc4
No known key found for this signature in database
GPG Key ID: DD507DAE96E8245C
5 changed files with 18 additions and 9 deletions

View File

@ -19,7 +19,7 @@ compat = []
unstable-exhaustive-types = []
# Private, only used in test / benchmarking code
__unstable-pre-spec = ["ruma-events/unstable-pre-spec"]
__ci = ["ruma-events/unstable-pre-spec"]
[dependencies]
itertools = "0.10.0"

View File

@ -394,7 +394,7 @@ where
content,
redacts: None,
unsigned: btreemap! {},
#[cfg(not(feature = "__unstable-pre-spec"))]
#[cfg(not(feature = "__ci"))]
origin: "foo".into(),
auth_events,
prev_events,

View File

@ -401,7 +401,7 @@ pub fn to_init_pdu_event(
content,
redacts: None,
unsigned: BTreeMap::new(),
#[cfg(not(feature = "__unstable-pre-spec"))]
#[cfg(not(feature = "__ci"))]
origin: "foo".into(),
auth_events: vec![],
prev_events: vec![],
@ -441,7 +441,7 @@ where
content,
redacts: None,
unsigned: BTreeMap::new(),
#[cfg(not(feature = "__unstable-pre-spec"))]
#[cfg(not(feature = "__ci"))]
origin: "foo".into(),
auth_events,
prev_events,

View File

@ -112,7 +112,6 @@ unstable-pre-spec = [
"ruma-common/unstable-pre-spec",
"ruma-events/unstable-pre-spec",
"ruma-federation-api/unstable-pre-spec",
"ruma-state-res/__unstable-pre-spec", # for tests
]
unstable-msc2448 = [
"ruma-client-api/unstable-msc2448",
@ -127,6 +126,18 @@ unstable-msc2677 = [
]
unstable-msc3618 = ["ruma-federation-api/unstable-msc3618"]
# Private feature, only used in test / benchmarking code
__ci = [
"full",
"unstable-pre-spec",
"unstable-msc2448",
"unstable-msc2675",
"unstable-msc2676",
"unstable-msc2677",
"unstable-msc3618",
"ruma-state-res/__ci",
]
[dependencies]
assign = "1.1.1"
js_int = "0.2.0"

View File

@ -71,9 +71,7 @@ impl CiTask {
cmd!("rustup run stable cargo check -p ruma-identifiers --no-default-features").run()?;
// 2. Run tests
let workspace_res =
cmd!("rustup run stable cargo test --workspace --features full,unstable-pre-spec")
.run();
let workspace_res = cmd!("rustup run stable cargo test --workspace --features __ci").run();
let events_compat_res =
cmd!("rustup run stable cargo test -p ruma-events --features compat compat").run();
@ -98,7 +96,7 @@ impl CiTask {
let clippy_all_res = cmd!(
"
rustup run nightly cargo clippy
--workspace --all-targets --features=full,compat,unstable-pre-spec -- -D warnings
--workspace --all-targets --features=__ci,compat -- -D warnings
"
)
.run();