<commit_before>language: rust

addons:
  apt:
    packages:
    - gcc
    - g++
    - libleveldb-dev
    - libssl-dev

rust:
- stable

cache:
  directories:
  - $HOME/.cargo
  - $HOME/.local
  - $TRAVIS_BUILD_DIR/target
sudo: false
group: deprecated-2017Q2
dist: trusty

env:
  global:
  - CLIPPY_VERS=0.0.142
  - RUSTFMT_VERS=0.9.0

install:
- |
  if [ ! -f "$HOME/.local/lib/libsodium.a" ]; then
    wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.13.tar.gz
    tar xvf libsodium-1.0.13.tar.gz
    cd libsodium-1.0.13
    ./configure --prefix=$HOME/.local
    make
    make install
    cd ..
  fi
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.local/lib
- export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/.local/lib/pkgconfig
- |
  if [[ "$FEATURE" == "clippy" ]]; then
    cargo clippy --version | grep $CLIPPY_VERS || cargo install clippy --force --vers $CLIPPY_VERS
  fi
# TODO: rename stage and feature
- |
  if [[ "$FEATURE" == "fmt" ]]; then
    cargo-audit -V || cargo install cargo-audit --force
    rustfmt -V | grep $RUSTFMT_VERS || cargo install rustfmt --vers $RUSTFMT_VERS --force
  fi
- cargo install --list

script: skip

jobs:
  include:
  - stage: format
    env:
    - FEATURE=fmt
    script:
    - cargo audit
    - cargo fmt -p exonum-configuration -- --write-mode=diff
    - cd sandbox_tests && cargo fmt -p exonum-configuration-sandbox -- --write-mode=diff
  - stage: lint
    rust: nightly-2017-07-05
    env:
    - FEATURE=clippy
    script:
    - cargo clippy -- -D warnings
  - stage: lint
    rust: nightly-2017-07-05
    env:
    - FEATURE=clippy
    script:
    - cd sandbox_tests && cargo clippy -- -D warnings
  - stage: test
    script:
    - cargo test
  - stage: test
    script:
    - RUST_LOG=off cargo test --manifest-path sandbox_tests/Cargo.toml

notifications:
  slack:
    rooms:
      secure: N3SOzAK7F4v3zAcvFBLdJmLJkLEpsp+euo75MErBmnk+goX18MAdXxJPIUA5ZPUHaO3pxtF0dB2U3G3b+AyF6rHTLxPTapa8M7N1i0p7LI7DyJGJ1rSnSmVpaX0C6a1dmzotCAF2WkyJWQwT5hq79VPbxIRsOuLDwxjPJwUffk8gDyTVHqqSb8KI9FPgsLpx54/TJJLmPYY2w8/+eZCjrgH0SZc9OX2ux29LflIGuRjKbYxrSkQrcQblr5Ak5k0YUfFeZ5NnQq5OE40wE7eBEVB8DK7lhgEeuMSTSat+/ShVINLZwL3aaCiHuF3VYlUtRjaEouoCatdGlvwNjo5DpKX81nXJoEjB0iQzZrDHIkbVPVOkkkBtWVuKCHue2nYb+rsI2kgtbjqb173JA/j2uZxYnc9xIEUe/VrqmZsXTyiUC7KCQc3Lk7A1juxUzn0gbzQkKcCeL48dEcnaAGrMqYY3P1O6I4U+LUlmixOTrEWEsXNQlLv0Ud9w+ZDjW+if0NxwB0jUgCB2cP6N1Wzyt0O3TwZ3+b6uyM2WrUYAv/mPu8FlUTZhJ33IvqtPTqsg6k4yZ2S8uBAmYCSjBLGDWusRKxwNep9s4VnhF7mqLr4U/y4FqvwnCKgx+7Nzcfoj4A9L6SO+kog1CUs3voLX2U96emGBZ/1Gs/o6KjoikHw=<commit_msg>Unite test jobs<commit_after>language: rust

addons:
  apt:
    packages:
    - gcc
    - g++
    - libleveldb-dev
    - libssl-dev

rust:
- stable

cache:
  directories:
  - $HOME/.cargo
  - $HOME/.local
  - $TRAVIS_BUILD_DIR/target
sudo: false
group: deprecated-2017Q2
dist: trusty

env:
  global:
  - CLIPPY_VERS=0.0.142
  - RUSTFMT_VERS=0.9.0

install:
- |
  if [ ! -f "$HOME/.local/lib/libsodium.a" ]; then
    wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.13.tar.gz
    tar xvf libsodium-1.0.13.tar.gz
    cd libsodium-1.0.13
    ./configure --prefix=$HOME/.local
    make
    make install
    cd ..
  fi
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.local/lib
- export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$HOME/.local/lib/pkgconfig
- |
  if [[ "$FEATURE" == "clippy" ]]; then
    cargo clippy --version | grep $CLIPPY_VERS || cargo install clippy --force --vers $CLIPPY_VERS
  fi
# TODO: rename stage and feature
- |
  if [[ "$FEATURE" == "fmt" ]]; then
    cargo-audit -V || cargo install cargo-audit --force
    rustfmt -V | grep $RUSTFMT_VERS || cargo install rustfmt --vers $RUSTFMT_VERS --force
  fi
- cargo install --list

script: skip

jobs:
  include:
  - stage: format
    env:
    - FEATURE=fmt
    script:
    - cargo audit
    - cargo fmt -p exonum-configuration -- --write-mode=diff
    - cd sandbox_tests && cargo fmt -p exonum-configuration-sandbox -- --write-mode=diff
  - stage: lint
    rust: nightly-2017-07-05
    env:
    - FEATURE=clippy
    script:
    - cargo clippy -- -D warnings
  - stage: lint
    rust: nightly-2017-07-05
    env:
    - FEATURE=clippy
    script:
    - cd sandbox_tests && cargo clippy -- -D warnings
  - stage: test
    script:
    - cargo test
    - RUST_LOG=off cargo test --manifest-path sandbox_tests/Cargo.toml

notifications:
  slack:
    rooms:
      secure: <KEY>
{'fraction_non_alphanumeric': 0.11747330152238128, 'fraction_numerical': 0.043626448534423996, 'mean_word_length': 3.0127620783956246, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2162836', 'n_tokens_mistral': 2036, 'n_tokens_neox': 1902, 'n_words': 316}