<commit_before>language: generic

addons:
  apt:
    packages:
    - gettext
    - libcurl4-openssl-dev
    - libicu-dev
    - libssl-dev
    - libunwind8
    - zlib1g

matrix:
  include:
    - os: linux
      dist: trusty
      sudo: required
      runtime:
        - name: netcore
          version: 1
      env: CONFIGURATION=Release FRAMEWORK=netcoreapp1.0
    - os: osx
      osx_image: xcode8.1
      runtime:
        - name: netcore
          version: 1
      env: CONFIGURATION=Release FRAMEWORK=netcoreapp1.0

before_install:
  - export DOTNET_INSTALL_DIR="$PWD/.dotnetcli"
  - mkdir $DOTNET_INSTALL_DIR
  - if test "$TRAVIS_OS_NAME" == "osx"; then
      brew install openssl;
      brew link --force openssl;
      mkdir -p /usr/local/lib;
      ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/;
      ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/;
      export DOTNET_SDK_URL="https://go.microsoft.com/fwlink/?LinkID=827533";
      curl -L $DOTNET_SDK_URL -o dotnet_package;
      tar -xvzf dotnet_package -C $DOTNET_INSTALL_DIR;
    else
      lsb_release -a;
      sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list';
      sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893;
      sudo apt-get update;
      sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177;
    fi

  # Add dotnet to PATH
  - export PATH="$DOTNET_INSTALL_DIR:$PATH"

install:
  # Display dotnet version info
  - which dotnet;
    if [ $? -eq 0 ]; then
      echo "Using dotnet:";
      dotnet --info;
    else
      echo "dotnet.exe not found";
      exit 1;
    fi

  # Restore dependencies
  - dotnet restore

script:
  # Run tests
  - ls
  - dotnet test -c $CONFIGURATION -f $FRAMEWORK ./test/BaristaLabs.BaristaCore.Tests/<commit_msg>TravisCI: Fix OSx .Net core install<commit_after>language: generic

addons:
  apt:
    packages:
    - gettext
    - libcurl4-openssl-dev
    - libicu-dev
    - libssl-dev
    - libunwind8
    - zlib1g

matrix:
  include:
    - os: linux
      dist: trusty
      sudo: required
      runtime:
        - name: netcore
          version: 1
      env: CONFIGURATION=Release FRAMEWORK=netcoreapp1.0
    - os: osx
      osx_image: xcode8.1
      runtime:
        - name: netcore
          version: 1
      env: CONFIGURATION=Release FRAMEWORK=netcoreapp1.0

before_install:
  - export DOTNET_INSTALL_DIR="$PWD/.dotnetcli"
  - mkdir $DOTNET_INSTALL_DIR
  - if test "$TRAVIS_OS_NAME" == "osx"; then
      sw_vers -productVersion;
      brew install openssl;
      brew link --force openssl;
      mkdir -p /usr/local/lib;
      ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/;
      ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/;
      export DOTNET_SDK_URL="https://go.microsoft.com/fwlink/?LinkID=835011";
      curl -L $DOTNET_SDK_URL -o dotnet_package;
      tar -xvzf dotnet_package -C $DOTNET_INSTALL_DIR;
    else
      lsb_release -a;
      sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list';
      sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893;
      sudo apt-get update;
      sudo apt-get install dotnet-dev-1.0.0-preview2.1-003177;
    fi

  # Add dotnet to PATH
  - export PATH="$DOTNET_INSTALL_DIR:$PATH"

install:
  # Display dotnet version info
  - which dotnet;
    if [ $? -eq 0 ]; then
      echo "Using dotnet:";
      dotnet --info;
    else
      echo "dotnet.exe not found";
      exit 1;
    fi

  # Restore dependencies
  - dotnet restore

script:
  # Run tests
  - ls lib/chakracore
  - dotnet test -c $CONFIGURATION -f $FRAMEWORK ./test/BaristaLabs.BaristaCore.Tests/
{'fraction_non_alphanumeric': 0.11702127659574468, 'fraction_numerical': 0.024390243902439025, 'mean_word_length': 2.3232758620689653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '164546', 'n_tokens_mistral': 1514, 'n_tokens_neox': 1414, 'n_words': 311}