<commit_before>clone:
  git:
    image: plugins/git
    # We clone submodules ourselves
    recursive: false

pipeline:
  # We add a custom clone step to workaround a bug with GitHub (see #3415)
  clone:
    image: plugins/git
    commands:
      # if build is PR rebase on top of target branch
      - if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then
          git config user.email "<EMAIL>";
          git config user.name "Dotty CI";
          git pull "$DRONE_REMOTE_URL" "$DRONE_BRANCH";
        fi

  # TESTS:
  # We run tests in parallel. Tests run in a copy of the working directory to avoid conflict
  test:
    group: test
    image: lampepfl/dotty:2019-04-22
    commands:
      - cp -R . /tmp/1/ && cd /tmp/1/
      - ./project/scripts/sbt ";compile ;test"
      - ./project/scripts/cmdTests

  test_bootstrapped:
    group: test
    image: lampepfl/dotty:2019-04-22
    commands:
      - cp -R . /tmp/2/ && cd /tmp/2/
      - ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test; dotty-semanticdb/compile; dotty-semanticdb/test:compile;sjsSandbox/run"
      - ./project/scripts/bootstrapCmdTests

  community_build:
    group: test
    image: lampepfl/dotty:2019-04-22
    commands:
      - cp -R . /tmp/3/ && cd /tmp/3/
      - git submodule update --init --recursive --jobs 7
      - ./project/scripts/sbt community-build/test

  test_sbt:
    group: test
    image: lampepfl/dotty:2019-04-22
    commands:
      - cp -R . /tmp/4/ && cd /tmp/4/
      - ./project/scripts/sbt sbt-dotty/scripted
    when:
      # sbt scripted tests are slow and only run on nightly or deployment
      event: [ tag, deployment ]

  test_scala212:
    group: test
    image: lampepfl/dotty:2019-04-22
    commands:
      - cp -R . /tmp/5/ && cd /tmp/5/
      - ./project/scripts/sbt ";++2.12.8 ;compile ;test"

  # DOCUMENTATION:
  documentation:
    image: lampepfl/dotty:2019-04-22
    commands:
      - ./project/scripts/genDocs
    secrets: [ bot_token ]
    when:
      event: push
      # We only generate the documentation for the master branch
      branch: master

  # PUBLISHING:
  # Publishing expect NIGHTLYBUILD or RELEASEBUILD to be set. See dottyVersion in Build.scala
  publish_nightly:
    image: lampepfl/dotty:2019-04-22
    environment:
      - NIGHTLYBUILD=yes
    commands:
      - ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
    secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ]
    when:
      event: deployment
      environment: nightly

  publish_release:
    image: lampepfl/dotty:2019-04-22
    environment:
      - RELEASEBUILD=yes
    commands:
      # Produces dotty-version.{tar.gz, zip}
      - ./project/scripts/sbt dist-bootstrapped/packArchive
      - ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
    secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ]
    when:
      event: tag

  # Publish dotty-version.{tar.gz, zip} to GitHub Release
  github_release:
    image: plugins/github-release
    secrets: [ github_token ]
    draft: true
    files:
      - dist-bootstrapped/target/dotty-*
    checksum:
      - sha256
    when:
      event: tag

  publish_sbt_release:
    image: lampepfl/dotty:2019-04-22
    environment:
      - RELEASEBUILD=yes
    commands:
      - ./project/scripts/sbtPublish ";sbt-dotty/publishSigned ;sonatypeRelease"
    secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ]
    when:
      event: deployment
      environment: sbt_release

  # NOTIFICATIONS:
  slack:
    image: plugins/slack
    channel: dotty
    secrets: [ slack_webhook ]
    when:
      status: [ failure ]
      event: [ push, tag, deployment ]
<commit_msg>Turn off Scala 2.12 CI tests outside of merges<commit_after>clone:
  git:
    image: plugins/git
    # We clone submodules ourselves
    recursive: false

pipeline:
  # We add a custom clone step to workaround a bug with GitHub (see #3415)
  clone:
    image: plugins/git
    commands:
      # if build is PR rebase on top of target branch
      - if [ "$DRONE_BUILD_EVENT" = "pull_request" ]; then
          git config user.email "<EMAIL>";
          git config user.name "<NAME>";
          git pull "$DRONE_REMOTE_URL" "$DRONE_BRANCH";
        fi

  # TESTS:
  # We run tests in parallel. Tests run in a copy of the working directory to avoid conflict
  test:
    group: test
    image: lampepfl/dotty:2019-04-22
    commands:
      - cp -R . /tmp/1/ && cd /tmp/1/
      - ./project/scripts/sbt ";compile ;test"
      - ./project/scripts/cmdTests

  test_bootstrapped:
    group: test
    image: lampepfl/dotty:2019-04-22
    commands:
      - cp -R . /tmp/2/ && cd /tmp/2/
      - ./project/scripts/sbt ";dotty-bootstrapped/compile ;dotty-bootstrapped/test; dotty-semanticdb/compile; dotty-semanticdb/test:compile;sjsSandbox/run"
      - ./project/scripts/bootstrapCmdTests

  community_build:
    group: test
    image: lampepfl/dotty:2019-04-22
    commands:
      - cp -R . /tmp/3/ && cd /tmp/3/
      - git submodule update --init --recursive --jobs 7
      - ./project/scripts/sbt community-build/test

  test_sbt:
    group: test
    image: lampepfl/dotty:2019-04-22
    commands:
      - cp -R . /tmp/4/ && cd /tmp/4/
      - ./project/scripts/sbt sbt-dotty/scripted
    when:
      # sbt scripted tests are slow and only run on nightly or deployment
      event: [ tag, deployment ]

  test_scala212:
    group: test
    image: lampepfl/dotty:2019-04-22
    commands:
      - cp -R . /tmp/5/ && cd /tmp/5/
      - ./project/scripts/sbt ";++2.12.8 ;compile ;test"
    when:
      event: [ tag, deployment ]

  # DOCUMENTATION:
  documentation:
    image: lampepfl/dotty:2019-04-22
    commands:
      - ./project/scripts/genDocs
    secrets: [ bot_token ]
    when:
      event: push
      # We only generate the documentation for the master branch
      branch: master

  # PUBLISHING:
  # Publishing expect NIGHTLYBUILD or RELEASEBUILD to be set. See dottyVersion in Build.scala
  publish_nightly:
    image: lampepfl/dotty:2019-04-22
    environment:
      - NIGHTLYBUILD=yes
    commands:
      - ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
    secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ]
    when:
      event: deployment
      environment: nightly

  publish_release:
    image: lampepfl/dotty:2019-04-22
    environment:
      - RELEASEBUILD=yes
    commands:
      # Produces dotty-version.{tar.gz, zip}
      - ./project/scripts/sbt dist-bootstrapped/packArchive
      - ./project/scripts/sbtPublish ";dotty-bootstrapped/publishSigned ;sonatypeRelease"
    secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ]
    when:
      event: tag

  # Publish dotty-version.{tar.gz, zip} to GitHub Release
  github_release:
    image: plugins/github-release
    secrets: [ github_token ]
    draft: true
    files:
      - dist-bootstrapped/target/dotty-*
    checksum:
      - sha256
    when:
      event: tag

  publish_sbt_release:
    image: lampepfl/dotty:2019-04-22
    environment:
      - RELEASEBUILD=yes
    commands:
      - ./project/scripts/sbtPublish ";sbt-dotty/publishSigned ;sonatypeRelease"
    secrets: [ sonatype_user, sonatype_pw, pgp_pw, pgp_secret ]
    when:
      event: deployment
      environment: sbt_release

  # NOTIFICATIONS:
  slack:
    image: plugins/slack
    channel: dotty
    secrets: [ slack_webhook ]
    when:
      status: [ failure ]
      event: [ push, tag, deployment ]

{'fraction_non_alphanumeric': 0.10767590618336886, 'fraction_numerical': 0.026252665245202558, 'mean_word_length': 2.4253765403925147, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, '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': '5662704', 'n_tokens_mistral': 2700, 'n_tokens_neox': 2529, 'n_words': 613}