<commit_before>sudo: false

notifications:
  irc:
    channels:
      - "chat.freenode.net#lichess"
    on_success: change
    on_failure: always
    use_notice: true
    skip_join: true
  slack:
    rooms:
      - secure: "<KEY>
    on_success: change
    on_failure: always
  email: false

env:
  global:
   - secure: "<KEY> # GITHUB_API_TOKEN

git:
  depth: 3
  submodules: false

install: ./bin/submodule-setup.sh

jobs:
  include:
    # Build server
    - stage: test
      language: scala
      jdk: oraclejdk8
      script: sbt test
      after_success:
       - sbt stage
       - git log -n 1 --pretty=oneline > commit.txt
       - tar -zcf "lila-server-${TRAVIS_BRANCH}.tar.gz" target/universal/stage LICENSE COPYING.md README.md commit.txt
      before_cache:
       - find $HOME/.ivy2/cache -name 'ivydata-*.properties' -delete
       - find $HOME/.sbt -name '*.lock' -delete
       - rm -rf $HOME/.sbt/0.13/dependency/module/dynamic
      cache:
        directories:
          - $HOME/.ivy2/cache
          - $HOME/.sbt

    # Build assets
    - stage: test
      language: node_js
      node_js: "4"
      addons:
        apt:
          packages:
           - parallel
      before_install: yarn global add gulp-cli
      script: ./ui/build prod
      after_success:
       - git log -n 1 --pretty=oneline > commit.txt
       - tar -zcf "lila-assets-${TRAVIS_BRANCH}.tar.gz" public LICENSE COPYING.md README.md commit.txt
      before_cache:
       - yarn cache dir
       - rm -rf $HOME/.cache/yarn/v1/npm-{types,common,chess,game,tree,ceval}-*
      cache:
        directories:
          - $HOME/.cache/yarn

addons:
  artifacts:
    bucket: lichess.org
    s3_region: eu-west-1
    cache_control: public
    paths: $(ls lila-*.tar.gz)
    target_paths: lila
    key:
      secure: "<KEY>
    secret:
      secure: "yoErYc4k/g00cP+P2jNZ3v4lAJnEuspE1j7DB9U42leWEGGgyqvKhNJLR5u/JLpxz2+UX6lmjlN0D3SLT4SVLpdacNvRdjRNVpazWpkOsxmKwiQRqjAQl/aoydW6JqUrFoIyH+HzSRdJdxLeXerEJdsTMXHRfHiBPaXWZzHnxY0="<commit_msg>simplify yarn caching<commit_after>sudo: false

notifications:
  irc:
    channels:
      - "chat.freenode.net#lichess"
    on_success: change
    on_failure: always
    use_notice: true
    skip_join: true
  slack:
    rooms:
      - secure: "<KEY>
    on_success: change
    on_failure: always
  email: false

env:
  global:
   - secure: "<KEY> # GITHUB_API_TOKEN

git:
  depth: 3
  submodules: false

install: ./bin/submodule-setup.sh

jobs:
  include:
    # Build server
    - stage: test
      language: scala
      jdk: oraclejdk8
      script: sbt test
      after_success:
       - sbt stage
       - git log -n 1 --pretty=oneline > commit.txt
       - tar -zcf "lila-server-${TRAVIS_BRANCH}.tar.gz" target/universal/stage LICENSE COPYING.md README.md commit.txt
      before_cache:
       - find $HOME/.ivy2/cache -name 'ivydata-*.properties' -delete
       - find $HOME/.sbt -name '*.lock' -delete
       - rm -rf $HOME/.sbt/0.13/dependency/module/dynamic
      cache:
        directories:
          - $HOME/.ivy2/cache
          - $HOME/.sbt

    # Build assets
    - stage: test
      language: node_js
      node_js: "4"
      addons:
        apt:
          packages:
           - parallel
      before_install: yarn global add gulp-cli
      script: ./ui/build prod
      after_success:
       - git log -n 1 --pretty=oneline > commit.txt
       - tar -zcf "lila-assets-${TRAVIS_BRANCH}.tar.gz" public LICENSE COPYING.md README.md commit.txt
      cache: yarn

addons:
  artifacts:
    bucket: lichess.org
    s3_region: eu-west-1
    cache_control: public
    paths: $(ls lila-*.tar.gz)
    target_paths: lila
    key:
      secure: "<KEY>
    secret:
      secure: "<KEY>
{'fraction_non_alphanumeric': 0.1101511879049676, 'fraction_numerical': 0.011879049676025918, 'mean_word_length': 2.110831234256927, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 14, 'https://': 0, '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': '2580184', 'n_tokens_mistral': 1395, 'n_tokens_neox': 1346, 'n_words': 289}