<commit_before>sudo: required
language: python

addons:
  apt:
    packages:
      - unzip
      # Java8 Required for Sonar and SQLCL
      - oracle-java8-installer
      - oracle-java8-set-default
  sonarqube:
    token:
      secure: ${SONAR_TOKEN}
    branches:
      - develop
      - master

services:
  - docker

env:
  global:
    - UT3_OWNER=ut3
    - UT3_OWNER_PASSWORD=<PASSWORD>
    - UT3_USER="UT3\$USER#"
    - UT3_USER_PASSWORD=<PASSWORD>
    - UT3_TABLESPACE=users
    # Environment for building a release
    - CURRENT_BRANCH=${TRAVIS_BRANCH}
    - UTPLSQL_REPO="utPLSQL/utPLSQL"
    - UTPLSQL_BUILD_NO="${TRAVIS_BUILD_NUMBER:-0}"
    - UTPLSQL_VERSION_PLACEHOLDER='utPLSQL - Version'
    - UTPLSQL_VERSION=$(. .travis/get_project_version.sh)
    - UTPLSQL_BUILD_VERSION=$(. .travis/get_project_build_version.sh)
    - UTPLSQL_SOURCES_DIR='source'
    - UTPLSQL_BUILD_USER_NAME="Travis CI"
    - CACHE_DIR=$HOME/.cache
    # Database Env
    - SQLCLI="$HOME/sqlcl/bin/sql"
    - ORACLE_PWD="oracle"
  matrix:
    - ORACLE_VERSION="11g-xe-r2"     CONNECTION_STR='127.0.0.1:1521/XE'       DOCKER_OPTIONS='--shm-size=1g'
    - ORACLE_VERSION="12c-se2-r1-v2" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs" 
    - ORACLE_VERSION="12c-se-r2-v4" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"

cache:
  pip: true
  directories:
    - $CACHE_DIR
    - node_modules

install:
  - pip install mkdocs
  - bash .travis/install_sqlcl.sh
  - sudo mkdir -p /dev/pdbs
  - sudo chmod -R 777 /dev/pdbs
  - if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/start_db.sh; fi
  - df -h

before_script:
  #The update_project_version is done before deployment to validate that the change of project files does not break installation
  - bash .travis/update_project_version.sh
  - git config --global user.email "<EMAIL>"
  - git config --global user.name "${UTPLSQL_BUILD_USER_NAME}"
  - git remote rm origin
  - git remote add origin https://${github_api_token}@github.com/${UTPLSQL_REPO}
<commit_msg>Sonar analysis is now under utPLSQL org.<commit_after>sudo: required
language: python

addons:
  apt:
    packages:
      - unzip
      # Java8 Required for Sonar and SQLCL
      - oracle-java8-installer
      - oracle-java8-set-default
  sonarcloud:
    organization: utplsql
    token:
      secure: ${SONAR_TOKEN}
    branches:
      - develop
      - master

services:
  - docker

env:
  global:
    - UT3_OWNER=ut3
    - UT3_OWNER_PASSWORD=<PASSWORD>
    - UT3_USER="UT3\$USER#"
    - UT3_USER_PASSWORD=<PASSWORD>
    - UT3_TABLESPACE=users
    # Environment for building a release
    - CURRENT_BRANCH=${TRAVIS_BRANCH}
    - UTPLSQL_REPO="utPLSQL/utPLSQL"
    - UTPLSQL_BUILD_NO="${TRAVIS_BUILD_NUMBER:-0}"
    - UTPLSQL_VERSION_PLACEHOLDER='utPLSQL - Version'
    - UTPLSQL_VERSION=$(. .travis/get_project_version.sh)
    - UTPLSQL_BUILD_VERSION=$(. .travis/get_project_build_version.sh)
    - UTPLSQL_SOURCES_DIR='source'
    - UTPLSQL_BUILD_USER_NAME="<NAME>"
    - CACHE_DIR=$HOME/.cache
    # Database Env
    - SQLCLI="$HOME/sqlcl/bin/sql"
    - ORACLE_PWD="<PASSWORD>"
  matrix:
    - ORACLE_VERSION="11g-xe-r2"     CONNECTION_STR='127.0.0.1:1521/XE'       DOCKER_OPTIONS='--shm-size=1g'
    - ORACLE_VERSION="12c-se2-r1-v2" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"
    - ORACLE_VERSION="12c-se-r2-v4" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1' DOCKER_OPTIONS="-v /dev/pdbs:/opt/oracle/oradata/pdbs"

cache:
  pip: true
  directories:
    - $CACHE_DIR
    - node_modules

install:
  - pip install mkdocs
  - bash .travis/install_sqlcl.sh
  - sudo mkdir -p /dev/pdbs
  - sudo chmod -R 777 /dev/pdbs
  - if [ "${TRAVIS_TAG}" = "" ]; then bash .travis/start_db.sh; fi
  - df -h

before_script:
  #The update_project_version is done before deployment to validate that the change of project files does not break installation
  - bash .travis/update_project_version.sh
  - git config --global user.email "<EMAIL>"
  - git config --global user.name "${UTPLSQL_BUILD_USER_NAME}"
  - git remote rm origin
  - git remote add origin https://${github_api_token}@github.com/${UTPLSQL_REPO}

{'fraction_non_alphanumeric': 0.1275992438563327, 'fraction_numerical': 0.027882797731568997, 'mean_word_length': 3.1418786692759295, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, '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': '7073762', 'n_tokens_mistral': 1747, 'n_tokens_neox': 1659, 'n_words': 277}