language: rust
cache: cargo
matrix:
  include:
  - rust: nightly
    before_script: rustup component add rustfmt-preview
    script: cargo fmt --all -- --check
  - rust: stable
    script:
    - cargo test
    after_success:
    - |-
      [ $TRAVIS_BRANCH = master ] &&
      [ $TRAVIS_PULL_REQUEST = false ] &&
      cargo publish --token ${CRATESIO_TOKEN}
env:
  global:
    secure: EG2Xnaz1S1jCtMMbdIj4f6A/An8ORbNVU8GnQyffAiMWYFFSQZHUdStm50S207xTs9e15HriONmU43nYqAbA29fe09hZukC29hEc+ouXeXrTekFdcE7rL/6ZziIjmRgH0yEgNYlzfeKuBOz+jbNjkRX4h5MzTedubaIKL9vOhA80rUWDy9bbUEVbupJL03NLRUjFTp7V1AQcYUzrDqiVHYt00cPiy5VaE7YY0wNDFxshB8ud1qpYbSQQdNu/BxvZro9YhezTywDjHzj4kIfRnmLyQkT3a1bhFOicxe77ycwI7qEJI3KVDxqrug6ryuMVpvrcueRzsqenHF/xjLG+8RWicZyWGi4RL3D+5zNj6Ax09CZnX/V3JXjWQtDueI41D3SsTYIWCzXYAZeX9ROO91rMx9FooUmNoyeuVA0uS4LfPqZH7O4v/6KpijbpBxnjILYNOeFi/NbnTerGnm6796b5MA7PrGMkL9cpjcpjT99+fbdLJ/e8xF+Nrajm164SrCBT5xccajulILJq6WNShcXWC5Vazwsp1M6MibPIXkeb8OdhHIpkfsLCGFg+Qwox5edfIYOmgganGZG056ynD/s7hLsknrtCpZccC33BYPNsqcggeSr1hxgUWk1UW2o78MIGHpIiqaeVOxdHZbNMe/a1p0UEseyujQFcrDVj0GU=
