<commit_before>env:
  global:
    - MATTERMOST_CHANNEL=appvengers
    - secure: <KEY>
    - secure: <KEY>
    - secure: <KEY> # REGISTRY TOKEN
    - secure: <KEY> # MATERMOST_HOOK_URL
    - secure: <KEY> #TESTCAFE_PHOTOS_URL
    - secure: <KEY> #TESTCAFE_DRIVE_URL
    - secure: <KEY> #TESTCAFE_USER_PASSWORD
    - secure: <KEY> #ANDROID_KEYSTORE_PASS
node-preset: &node
  language: node_js
  node_js:
    - '8'
  cache:
    yarn: true
    directories:
      - node_modules
stages:
  - prebuild
  - build
jobs:
  include:
    - name: "Lint"
      stage: "prebuild"
      script: yarn lint
      <<: *node
    - name: "Unit tests"
      stage: "prebuild"
      script: yarn test
      <<: *node
    - &build-web
      name: "Drive web"
      stage: "build"
      env:
        - COZY_APP_SLUG=drive
      <<: *node
      addons:
        firefox: latest
      before_install:
        - scripts/transifex.sh
        - scripts/decrypt.sh
      script:
        - yarn tx
        - yarn build:$COZY_APP_SLUG:browser
        - test TRAVIS_PULL_REQUEST && yarn testcafe:$COZY_APP_SLUG || echo "skipping testcafe outside of pull requests"
      before_deploy:
        - &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
        - yarn add cozy-app-publish
      deploy:
        - provider: script
          repo: cozy/cozy-drive
          skip-cleanup: true
          script: yarn run deploy:$COZY_APP_SLUG
          on:
            branch: master
        - provider: script
          repo: cozy/cozy-drive
          skip-cleanup: true
          script: yarn run deploy:$COZY_APP_SLUG
          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:
        directories:
          - $HOME/.gradle/caches/
          - $HOME/.gradle/wrapper/
          - $HOME/.android/build-cache
      env:
        - COZY_APP_SLUG=drive
      before_install:
        - yes | sdkmanager "platforms;android-27"
        - scripts/transifex.sh
        - 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
        - export PATH=/usr/local/android-sdk/build-tools/26.0.2:$PATH
      script:
        - yarn tx
        - yarn build:drive:mobile
        - yarn genicon:drive:mobile
        - yarn prepare:drive:mobile
        - mkdir -p src/drive/targets/mobile/build/android/<commit_msg>chore: Cache node modules on android<commit_after>env:
  global:
    - MATTERMOST_CHANNEL=appvengers
    - secure: <KEY>
    - secure: <KEY>
    - secure: <KEY> # REGISTRY TOKEN
    - secure: <KEY> # MATERMOST_HOOK_URL
    - secure: <KEY> #TESTCAFE_PHOTOS_URL
    - secure: <KEY> #TESTCAFE_DRIVE_URL
    - secure: <KEY> #TESTCAFE_USER_PASSWORD
    - secure: <KEY> #ANDROID_KEYSTORE_PASS
node-preset: &node
  language: node_js
  node_js:
    - '8'
  cache:
    yarn: true
    directories:
      - node_modules
stages:
  - prebuild
  - build
jobs:
  include:
    - name: "Lint"
      stage: "prebuild"
      script: yarn lint
      <<: *node
    - name: "Unit tests"
      stage: "prebuild"
      script: yarn test
      <<: *node
    - &build-web
      name: "Drive web"
      stage: "build"
      env:
        - COZY_APP_SLUG=drive
      <<: *node
      addons:
        firefox: latest
      before_install:
        - scripts/transifex.sh
        - scripts/decrypt.sh
      script:
        - yarn tx
        - yarn build:$COZY_APP_SLUG:browser
        - test TRAVIS_PULL_REQUEST && yarn testcafe:$COZY_APP_SLUG || echo "skipping testcafe outside of pull requests"
      before_deploy:
        - &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
        - yarn add cozy-app-publish
      deploy:
        - provider: script
          repo: cozy/cozy-drive
          skip-cleanup: true
          script: yarn run deploy:$COZY_APP_SLUG
          on:
            branch: master
        - provider: script
          repo: cozy/cozy-drive
          skip-cleanup: true
          script: yarn run deploy:$COZY_APP_SLUG
          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"
        - scripts/transifex.sh
        - 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
        - export PATH=/usr/local/android-sdk/build-tools/26.0.2:$PATH
      script:
        - yarn tx
        - yarn build:drive:mobile
        - yarn genicon:drive:mobile
        - yarn prepare:drive:mobile
        - mkdir -p src/drive/targets/mobile/build/android/
{'fraction_non_alphanumeric': 0.1109217924689044, 'fraction_numerical': 0.005793150451524962, 'mean_word_length': 1.7885985748218527, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 19, 'https://': 2, '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': '2034443', 'n_tokens_mistral': 2070, 'n_tokens_neox': 1963, 'n_words': 409}