<commit_before>node-preset: &node # Used internally to share configuration, ignored by travis.
  language: node_js
  node_js:
    - "10"
  cache:
    yarn: true
    directories:
      - node_modules
branches:
  only:
    - master
    # tags
    - /^v\d+\.\d+\.\d+(\-beta.\d+)?$/
stages:
  - prebuild
  - build
jobs:
  include:
    - name: "Lint"
      stage: "prebuild"
      <<: *node
      script: yarn lint
    - name: "Unit tests"
      stage: "prebuild"
      <<: *node
      script: yarn test
    - &build-web
      name: "Drive web"
      stage: "build"
      <<: *node
      env:
        - COZY_APP_SLUG=drive
      before_script:
        - yarn run cozy-ci-transifex
        - scripts/decrypt.sh
      script:
        - echo 'pull langages' && echo -en 'travis_fold:start:txpull\\r'
        - yarn tx
        - echo -en 'travis_fold:end:txpull\\r'
        - echo 'build' && echo -en 'travis_fold:start:build\\r'
        - yarn build:$COZY_APP_SLUG:browser
        - echo -en 'travis_fold:end:build\\r'
        - &downcloud-cert if [ "$TRAVIS_SECURE_ENV_VARS" != "false" ]; then eval "$(ssh-agent -s)" && chmod 600 /tmp/id_rsa_travis_downcloud && ssh-add /tmp/id_rsa_travis_downcloud; fi # Needs to be inlined and not in a script to work.
        #- echo 'create and deploy' && echo -en 'travis_fold:start:createanddeploy\\r'
        #- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./scripts/create-deploy-test.sh; fi
        #- echo -en 'travis_fold:end:createanddeploy\\r'
        #- echo 'delete instance' && echo -en 'travis_fold:start:deleteinstance\\r'
        #- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./scripts/delete-instance.sh; fi
        #- echo -en 'travis_fold:end:deleteinstance\\r'
      before_deploy:
        - yarn add cozy-app-publish
      deploy:
        - &deploy
          provider: script
          repo: cozy/cozy-drive
          skip-cleanup: true
          script: yarn run deploy:$COZY_APP_SLUG
          on:
            branch: master
        - <<: *deploy
          on:
            tags: true
    - <<: *build-web
      name: "Photos web"
      env:
        - COZY_APP_SLUG=photos
    - name: "Drive android"
      stage: "build"
      language: android
      android:
        components:
          - build-tools-26.0.2
      before_cache:
        - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
        - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
      cache:
        yarn: true
        directories:
          - node_modules
          - $HOME/.gradle/caches/
          - $HOME/.gradle/wrapper/
          - $HOME/.android/build-cache
      env:
        - COZY_APP_SLUG=drive
      before_install:
        - yes | sdkmanager "platforms;android-27" # see https://github.com/travis-ci/travis-ci/issues/8874#issuecomment-350350607
        - scripts/decrypt.sh
        - scripts/signing.sh
        - curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
        - sudo apt-get install nodejs
        - sudo apt-get install build-essential
        - yarn
        - yarn run cozy-ci-transifex
        - export PATH=/usr/local/android-sdk/build-tools/26.0.2:$PATH # Required to expose apksigner command.
      script:
        - yarn tx
        - yarn build:drive:mobile
        - yarn genicon:drive:mobile
        - yarn prepare:drive:mobile
        - mkdir -p src/drive/targets/mobile/build/android/
        - yarn build:drive:android
        - yarn autosign:drive:android
      after_success:
        - *downcloud-cert
        - if [[ "$(git log -2)" =~ [\[APK\]] ]]; then APK_URL=$(node scripts/downcloud.js src/drive/targets/mobile/build/android/cozy-drive.apk) && yarn run cozy-ci-github "🎁 [Click here]($APK_URL) to download the latest Android APK"; fi
env:
  global:
    - MATTERMOST_CHANNEL=appvengers
    - secure: <KEY>
    - <KEY>
    - secure: <KEY> # REGISTRY TOKEN
    - secure: <KEY> # MATERMOST_HOOK_URL
    - secure: <KEY> #ANDROID_KEYSTORE_PASS
    - secure: <KEY> #GH_TOKEN
    - secure: <KEY> # RUNDECK_TOKEN
<commit_msg>chore: Use Node 10<commit_after>node-preset: &node # Used internally to share configuration, ignored by travis.
  language: node_js
  node_js:
    - "10"
  cache:
    yarn: true
    directories:
      - node_modules
branches:
  only:
    - master
    # tags
    - /^v\d+\.\d+\.\d+(\-beta.\d+)?$/
stages:
  - prebuild
  - build
jobs:
  include:
    - name: "Lint"
      stage: "prebuild"
      <<: *node
      script: yarn lint
    - name: "Unit tests"
      stage: "prebuild"
      <<: *node
      script: yarn test
    - &build-web
      name: "Drive web"
      stage: "build"
      <<: *node
      env:
        - COZY_APP_SLUG=drive
      before_script:
        - yarn run cozy-ci-transifex
        - scripts/decrypt.sh
      script:
        - echo 'pull langages' && echo -en 'travis_fold:start:txpull\\r'
        - yarn tx
        - echo -en 'travis_fold:end:txpull\\r'
        - echo 'build' && echo -en 'travis_fold:start:build\\r'
        - yarn build:$COZY_APP_SLUG:browser
        - echo -en 'travis_fold:end:build\\r'
        - &downcloud-cert if [ "$TRAVIS_SECURE_ENV_VARS" != "false" ]; then eval "$(ssh-agent -s)" && chmod 600 /tmp/id_rsa_travis_downcloud && ssh-add /tmp/id_rsa_travis_downcloud; fi # Needs to be inlined and not in a script to work.
        #- echo 'create and deploy' && echo -en 'travis_fold:start:createanddeploy\\r'
        #- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./scripts/create-deploy-test.sh; fi
        #- echo -en 'travis_fold:end:createanddeploy\\r'
        #- echo 'delete instance' && echo -en 'travis_fold:start:deleteinstance\\r'
        #- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./scripts/delete-instance.sh; fi
        #- echo -en 'travis_fold:end:deleteinstance\\r'
      before_deploy:
        - yarn add cozy-app-publish
      deploy:
        - &deploy
          provider: script
          repo: cozy/cozy-drive
          skip-cleanup: true
          script: yarn run deploy:$COZY_APP_SLUG
          on:
            branch: master
        - <<: *deploy
          on:
            tags: true
    - <<: *build-web
      name: "Photos web"
      env:
        - COZY_APP_SLUG=photos
    - name: "Drive android"
      stage: "build"
      language: android
      android:
        components:
          - build-tools-26.0.2
      before_cache:
        - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
        - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
      cache:
        yarn: true
        directories:
          - node_modules
          - $HOME/.gradle/caches/
          - $HOME/.gradle/wrapper/
          - $HOME/.android/build-cache
      env:
        - COZY_APP_SLUG=drive
      before_install:
        - yes | sdkmanager "platforms;android-27" # see https://github.com/travis-ci/travis-ci/issues/8874#issuecomment-350350607
        - scripts/decrypt.sh
        - scripts/signing.sh
        - curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
        - sudo apt-get install nodejs
        - sudo apt-get install build-essential
        - yarn
        - yarn run cozy-ci-transifex
        - export PATH=/usr/local/android-sdk/build-tools/26.0.2:$PATH # Required to expose apksigner command.
      script:
        - yarn tx
        - yarn build:drive:mobile
        - yarn genicon:drive:mobile
        - yarn prepare:drive:mobile
        - mkdir -p src/drive/targets/mobile/build/android/
        - yarn build:drive:android
        - yarn autosign:drive:android
      after_success:
        - *downcloud-cert
        - if [[ "$(git log -2)" =~ [\[APK\]] ]]; then APK_URL=$(node scripts/downcloud.js src/drive/targets/mobile/build/android/cozy-drive.apk) && yarn run cozy-ci-github "🎁 [Click here]($APK_URL) to download the latest Android APK"; fi
env:
  global:
    - MATTERMOST_CHANNEL=appvengers
    - secure: <KEY>
    - secure: <KEY>
    - secure: <KEY> # REGISTRY TOKEN
    - secure: <KEY> # MATERMOST_HOOK_URL
    - secure: <KEY> #ANDROID_KEYSTORE_PASS
    - secure: <KEY> #GH_TOKEN
    - secure: <KEY> # RUNDECK_TOKEN

{'fraction_non_alphanumeric': 0.1323529411764706, 'fraction_numerical': 0.008349950149551345, 'mean_word_length': 1.9579800958348692, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 17, 'https://': 4, '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': '2423367', 'n_tokens_mistral': 2873, 'n_tokens_neox': 2737, 'n_words': 582}