maud/.travis.yml
Berwyn Jamesson ad8dc8c4c7
Add an off-by-default 'unstable' flag ()
* Add an off-by-default 'unstable' flag

* Remove explicit web framework feature names

Having forgotten that deps and features can't have the same name,
attempts to better document all the features in one place were
misplaced.

* Split up tests on Travis

`cargo test` doesn't allow `--workspace` and `--features`
simultaneously, so we're forced to test each package separately in order
to manually specify features (or in this case, test everything but
unstable)

* Update Travis Config

- Document the state of Cargo workspaces and features
- Update the benchmarks to trickle down the 'unstable' feature
2020-07-21 22:04:48 +10:00

45 lines
1.5 KiB
YAML

language: rust
rust: nightly
sudo: false
jobs:
include:
- name: "Main"
script:
- |
RUN_CLIPPY=true
rustup component add clippy --toolchain=nightly || RUN_CLIPPY=false
# 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
for package in maud_htmlescape maud_macros maud; do
(cd $package && cargo clippy -- -D warnings) || CLIPPY_STATUS=$?
done
(exit $CLIPPY_STATUS)
fi
- name: "Unstable"
script:
- cargo test --all --all-features
- name: "Benchmarks"
script:
- (cd benchmarks && cargo test --benches --features unstable)
- name: "Documentation"
script:
- (cd docs && make -j$(nproc))
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
fqdn: maud.lambda.xyz
local_dir: docs/site
on:
branch: master