mirror of
https://github.com/serde-rs/json.git
synced 2025-10-01 06:51:58 +00:00
Combine serde_json and tests into one crate
This commit is contained in:
parent
d37fc6cc7e
commit
e11f3d11ed
36
Cargo.toml
36
Cargo.toml
@ -1,5 +1,31 @@
|
||||
[workspace]
|
||||
members = [
|
||||
"json",
|
||||
"json_tests",
|
||||
]
|
||||
[package]
|
||||
name = "serde_json"
|
||||
version = "0.9.10"
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
description = "A JSON serialization file format"
|
||||
repository = "https://github.com/serde-rs/json"
|
||||
documentation = "http://docs.serde.rs/serde_json/"
|
||||
keywords = ["json", "serde", "serialization"]
|
||||
categories = ["encoding"]
|
||||
readme = "../README.md"
|
||||
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
|
||||
publish = false # this branch contains breaking changes
|
||||
|
||||
[badges]
|
||||
travis-ci = { repository = "serde-rs/json" }
|
||||
|
||||
[features]
|
||||
preserve_order = ["linked-hash-map"]
|
||||
|
||||
[dependencies]
|
||||
serde = { git = "https://github.com/serde-rs/serde", branch = "1.0" }
|
||||
num-traits = "0.1.32"
|
||||
linked-hash-map = { version = "0.4.1", optional = true }
|
||||
itoa = "0.3"
|
||||
dtoa = "0.4"
|
||||
|
||||
[dev-dependencies]
|
||||
compiletest_rs = "0.2"
|
||||
serde_bytes = { git = "https://github.com/serde-rs/bytes", branch = "1.0" }
|
||||
serde_derive = { git = "https://github.com/serde-rs/serde", branch = "1.0" }
|
||||
|
@ -1,30 +0,0 @@
|
||||
[package]
|
||||
name = "serde_json"
|
||||
version = "0.9.10"
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
|
||||
license = "MIT/Apache-2.0"
|
||||
description = "A JSON serialization file format"
|
||||
repository = "https://github.com/serde-rs/json"
|
||||
documentation = "http://docs.serde.rs/serde_json/"
|
||||
keywords = ["json", "serde", "serialization"]
|
||||
categories = ["encoding"]
|
||||
readme = "../README.md"
|
||||
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
|
||||
publish = false # this branch contains breaking changes
|
||||
|
||||
[badges]
|
||||
travis-ci = { repository = "serde-rs/json" }
|
||||
|
||||
[features]
|
||||
preserve_order = ["linked-hash-map"]
|
||||
|
||||
[dependencies]
|
||||
serde = { git = "https://github.com/serde-rs/serde", branch = "1.0" }
|
||||
num-traits = "0.1.32"
|
||||
linked-hash-map = { version = "0.4.1", optional = true }
|
||||
itoa = "0.3"
|
||||
dtoa = "0.4"
|
||||
|
||||
[dev-dependencies]
|
||||
serde_bytes = { git = "https://github.com/serde-rs/bytes", branch = "1.0" }
|
||||
serde_derive = { git = "https://github.com/serde-rs/serde", branch = "1.0" }
|
@ -1 +0,0 @@
|
||||
../LICENSE-APACHE
|
@ -1 +0,0 @@
|
||||
../LICENSE-MIT
|
@ -1 +0,0 @@
|
||||
../README.md
|
@ -1,18 +0,0 @@
|
||||
[package]
|
||||
name = "serde_json_tests"
|
||||
version = "0.0.0"
|
||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>"]
|
||||
publish = false
|
||||
|
||||
[features]
|
||||
trace-macros = []
|
||||
unstable-testing = ["compiletest_rs"]
|
||||
|
||||
[dev-dependencies]
|
||||
serde = { git = "https://github.com/serde-rs/serde", branch = "1.0" }
|
||||
serde_bytes = { git = "https://github.com/serde-rs/bytes", branch = "1.0" }
|
||||
serde_json = { path = "../json" }
|
||||
serde_derive = { git = "https://github.com/serde-rs/serde", branch = "1.0" }
|
||||
|
||||
[dependencies]
|
||||
compiletest_rs = { version = "0.2", optional = true }
|
@ -1,5 +1,3 @@
|
||||
#![cfg(feature = "unstable-testing")]
|
||||
|
||||
extern crate compiletest_rs as compiletest;
|
||||
|
||||
use std::env;
|
||||
@ -8,7 +6,7 @@ fn run_mode(mode: &'static str) {
|
||||
let mut config = compiletest::default_config();
|
||||
|
||||
config.mode = mode.parse().expect("invalid mode");
|
||||
config.target_rustcflags = Some("-L deps/target/debug/deps".to_owned());
|
||||
config.target_rustcflags = Some("-L tests/deps/target/debug/deps".to_owned());
|
||||
if let Ok(name) = env::var("TESTNAME") {
|
||||
config.filter = Some(name);
|
||||
}
|
@ -7,4 +7,4 @@ publish = false
|
||||
[workspace]
|
||||
|
||||
[dependencies]
|
||||
serde_json = { path = "../../json" }
|
||||
serde_json = { path = "../.." }
|
13
travis.sh
13
travis.sh
@ -28,25 +28,16 @@ if [ -n "${CLIPPY}" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
cd "$DIR/json"
|
||||
cargo clippy -- -Dclippy
|
||||
|
||||
cd "$DIR/json_tests"
|
||||
cargo clippy -- -Dclippy
|
||||
else
|
||||
CHANNEL=nightly
|
||||
cd "$DIR/json"
|
||||
channel clean
|
||||
channel build
|
||||
channel build --features preserve_order
|
||||
(cd "$DIR/tests/deps" && channel build)
|
||||
channel test
|
||||
cd "$DIR/json_tests/deps"
|
||||
channel build
|
||||
cd "$DIR/json_tests"
|
||||
channel test --features unstable-testing
|
||||
channel test --features preserve_order
|
||||
|
||||
for CHANNEL in stable 1.12.0 1.13.0 beta; do
|
||||
cd "$DIR/json"
|
||||
channel clean
|
||||
channel build
|
||||
channel build --features preserve_order
|
||||
|
Loading…
x
Reference in New Issue
Block a user