<commit_before>os: linux
language: node_js
jobs:
  include:
    # Test Typescript package
    - stage: test
      language: node_js
      node_js: '14'

      script:
        - npm run lint
        - npm run build
        - npm run test:cover
        - npm run docs

      after_success:
        - bash <(curl -s https://codecov.io/bash) -cF ts

    # Test Python package
    - stage: test
      language: python
      python: '3.7'
      dist: xenial

      before_install:
        - cd py

      install:
        - make setup

      script:
        - make lint
        - make test
        - make build
        - make docs

      after_success:
        - bash <(curl -s https://codecov.io/bash) -cF py

    # Test R package
    - stage: test
      language: r
      r: release

      before_install:
        - cd r

      script:
        - make lint
        - make test
        - make build
        - make docs

      after_success:
        - Rscript -e 'covr::codecov()'

    # The following deployment jobs will only run if all of
    # the above test jobs have passed

    # Deploy NPM package and create a release
    - stage: deploy
      language: node_js
      node_js: '14'

      script:
        - npm run build
        - npm run docs

      deploy:
        # Deploy a new version of NPM package and create a Github release
        # This creates a new version tag, which will then trigger the
        # following deploy jobs for other language packages.
        - provider: script
          skip_cleanup: true
          script: npx semantic-release

        # Commit package documentation to gh-pages
        # Main documentation is deployed using Netlify
        - provider: script
          skip_cleanup: true
          on:
            tags: true
          script: bash .travis.sh deploy_typescript_docs_to_pages

    # Deploy Python package
    - stage: deploy
      language: python
      python: '3.7'
      dist: xenial

      before_install:
        - cd py

      install:
        - make setup

      script:
        - make docs

      deploy:
        - provider: pypi
          username: $PYPI_USERNAME
          password: <PASSWORD>
          on:
            tags: true

        - provider: script
          skip_cleanup: true
          on:
            tags: true
          script: bash ../.travis.sh deploy_python_docs_to_pages

    # Deploy R package
    - stage: deploy
      language: r
      r: release

      before_install:
        - cd r

      script:
        - make docs

      deploy:
        - provider: script
          skip_cleanup: true
          on:
            tags: true
          script: bash ../.travis.sh deploy_r_docs_to_pages<commit_msg>ci(Travis): Add apt packages needed for R setup<commit_after>os: linux
language: node_js
jobs:
  include:
    # Test Typescript package
    - stage: test
      language: node_js
      node_js: '14'

      script:
        - npm run lint
        - npm run build
        - npm run test:cover
        - npm run docs

      after_success:
        - bash <(curl -s https://codecov.io/bash) -cF ts

    # Test Python package
    - stage: test
      language: python
      python: '3.7'
      dist: xenial

      before_install:
        - cd py

      install:
        - make setup

      script:
        - make lint
        - make test
        - make build
        - make docs

      after_success:
        - bash <(curl -s https://codecov.io/bash) -cF py

    # Test R package
    - stage: test
      language: r
      r: release
      addons:
        apt:
          packages:
            - libharfbuzz-dev
            - libfribidi-dev

      before_install:
        - cd r

      script:
        - make lint
        - make test
        - make build
        - make docs

      after_success:
        - Rscript -e 'covr::codecov()'

    # The following deployment jobs will only run if all of
    # the above test jobs have passed

    # Deploy NPM package and create a release
    - stage: deploy
      language: node_js
      node_js: '14'

      script:
        - npm run build
        - npm run docs

      deploy:
        # Deploy a new version of NPM package and create a Github release
        # This creates a new version tag, which will then trigger the
        # following deploy jobs for other language packages.
        - provider: script
          skip_cleanup: true
          script: npx semantic-release

        # Commit package documentation to gh-pages
        # Main documentation is deployed using Netlify
        - provider: script
          skip_cleanup: true
          on:
            tags: true
          script: bash .travis.sh deploy_typescript_docs_to_pages

    # Deploy Python package
    - stage: deploy
      language: python
      python: '3.7'
      dist: xenial

      before_install:
        - cd py

      install:
        - make setup

      script:
        - make docs

      deploy:
        - provider: pypi
          username: $PYPI_USERNAME
          password: <PASSWORD>
          on:
            tags: true

        - provider: script
          skip_cleanup: true
          on:
            tags: true
          script: bash ../.travis.sh deploy_python_docs_to_pages

    # Deploy R package
    - stage: deploy
      language: r
      r: release
      addons:
        apt:
          packages:
            - libharfbuzz-dev
            - libfribidi-dev

      before_install:
        - cd r

      script:
        - make docs

      deploy:
        - provider: script
          skip_cleanup: true
          on:
            tags: true
          script: bash ../.travis.sh deploy_r_docs_to_pages
{'fraction_non_alphanumeric': 0.06508559201141227, 'fraction_numerical': 0.0028530670470756064, 'mean_word_length': 1.380730050933786, 'pattern_counts': {'":': 0, '<': 9, '<?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': '853246', 'n_tokens_mistral': 1654, 'n_tokens_neox': 1546, 'n_words': 530}