diff --git a/.travis.yml b/.travis.yml index 215c4da..caf05c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,15 @@ jobs: - | RUN_CLIPPY=true rustup component add clippy --toolchain=nightly || RUN_CLIPPY=false - - cargo test --all --all-features + # As of right now, these need to be tested individually becuase `--workspace` + # (which is implied by `workspace = true`) cannot be used with `--features` + # This _may_ be resolved with the `--package` flag, however this requires + # opting in to a `-Z` unstable feature as of time of commit. + # + # Follow https://github.com/rust-lang/cargo/issues/5364 for updates. + - cargo test --manifest-path maud/Cargo.toml --features actix-web,iron,rocket + - cargo test --manifest-path maud_htmlescape/Cargo.toml + - cargo test --manifest-path maud_macros/Cargo.toml - | if $RUN_CLIPPY; then CLIPPY_STATUS=0 @@ -18,9 +26,12 @@ jobs: done (exit $CLIPPY_STATUS) fi + - name: "Unstable" + script: + - cargo test --all --all-features - name: "Benchmarks" script: - - (cd benchmarks && cargo test --benches) + - (cd benchmarks && cargo test --benches --features unstable) - name: "Documentation" script: - (cd docs && make -j$(nproc)) diff --git a/benchmarks/Cargo.toml b/benchmarks/Cargo.toml index adcce70..fe8ec2f 100644 --- a/benchmarks/Cargo.toml +++ b/benchmarks/Cargo.toml @@ -4,6 +4,9 @@ version = "0.1.2" authors = ["Chris Wong <lambda.fairy@gmail.com>"] edition = "2018" +[features] +unstable = ["maud/unstable"] + [dependencies] maud = { path = "../maud" } handlebars = "*" diff --git a/maud/Cargo.toml b/maud/Cargo.toml index 4558fb6..2664158 100644 --- a/maud/Cargo.toml +++ b/maud/Cargo.toml @@ -12,8 +12,14 @@ categories = ["template-engine"] edition = "2018" [features] +default = [] + +# Web framework integrations actix-web = ["actix-web-dep", "futures"] +# Unstable features +unstable = [] + [dependencies] maud_htmlescape = { version = "0.17.0", path = "../maud_htmlescape" } maud_macros = { version = "0.22.0", path = "../maud_macros" }