<commit_before>name: CI for Scala3doc

on:
  push:
    branches:
      - master
  pull_request:
jobs:
  build:
    runs-on: [self-hosted, Linux]
    container: lampepfl/dotty:2020-04-24
    
    steps:

      - uses: actions/checkout@v2
      - run: git fetch --prune --unshallow --tags

      - name: Cache Coursier
        uses: actions/cache@v1
        with:
          path: ~/.cache/coursier
          key: sbt-coursier-cache
      - name: Cache SBT
        uses: actions/cache@v1
        with:
          path: ~/.sbt
          key: sbt-${{ hashFiles('**/build.sbt') }}

      - name: Set up JDK 11
        uses: actions/setup-java@v1
        with:
          java-version: 11

      - name: Compile and test
        run: ./project/scripts/sbt scala3doc/test

      - name: Locally publish self
        run: ./project/scripts/sbt scala3doc/publishLocal

      - name: Generate test documentation
        run: ./project/scripts/sbt scala3doc/generateSelfDocumentation

      - name: Generate Scala 3 documentation
        run: ./project/scripts/sbt scala3doc/generateScala3Documentation

      - name: Generate documentation for example project using dotty-sbt
        run: |
          ./project/scripts/sbt ";sbt-dotty/publishLocal;scala3/publishLocal;publishLocal"
          VERSION=$(./project/scripts/sbt "show sbt-dotty/version" | tail -1 | sed 's/\[info\] //')
          echo Using sbt-dotty version: $VERSION
          echo 'addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "'$VERSION'")' > scala3doc/example-project/project/dotty.sbt

          SCALA_VERSION=$(./project/scripts/sbt "show scala3-compiler-bootstrapped/version" | tail -1 | sed 's/\[info\] //')
          echo Using scala version: $SCALA_VERSION
          echo 'scalaVersion := "'$SCALA_VERSION'"' > scala3doc/example-project/dotty.sbt

          cd scala3doc/example-project
          sbt doc
<commit_msg>Try to run on public CI nodes<commit_after>name: CI for Scala3doc

on:
  push:
    branches:
      - master
  pull_request:
jobs:
  build:
    runs-on: ubuntu-latest
    container: lampepfl/dotty:2020-04-24
    
    steps:

      - uses: actions/checkout@v2
      - run: git fetch --prune --unshallow --tags

      - name: Cache Coursier
        uses: actions/cache@v1
        with:
          path: ~/.cache/coursier
          key: sbt-coursier-cache
      - name: Cache SBT
        uses: actions/cache@v1
        with:
          path: ~/.sbt
          key: sbt-${{ hashFiles('**/build.sbt') }}

      - name: Set up JDK 11
        uses: actions/setup-java@v1
        with:
          java-version: 11

      - name: Compile and test
        run: ./project/scripts/sbt scala3doc/test

      - name: Locally publish self
        run: ./project/scripts/sbt scala3doc/publishLocal

      - name: Generate test documentation
        run: ./project/scripts/sbt scala3doc/generateSelfDocumentation

      - name: Generate Scala 3 documentation
        run: ./project/scripts/sbt scala3doc/generateScala3Documentation

      - name: Generate documentation for example project using dotty-sbt
        run: |
          ./project/scripts/sbt ";sbt-dotty/publishLocal;scala3/publishLocal;publishLocal"
          VERSION=$(./project/scripts/sbt "show sbt-dotty/version" | tail -1 | sed 's/\[info\] //')
          echo Using sbt-dotty version: $VERSION
          echo 'addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "'$VERSION'")' > scala3doc/example-project/project/dotty.sbt

          SCALA_VERSION=$(./project/scripts/sbt "show scala3-compiler-bootstrapped/version" | tail -1 | sed 's/\[info\] //')
          echo Using scala version: $SCALA_VERSION
          echo 'scalaVersion := "'$SCALA_VERSION'"' > scala3doc/example-project/dotty.sbt

          cd scala3doc/example-project
          sbt doc

{'fraction_non_alphanumeric': 0.11938314278117522, 'fraction_numerical': 0.015953203935123637, 'mean_word_length': 2.1454849498327757, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6937203', 'n_tokens_mistral': 1263, 'n_tokens_neox': 1209, 'n_words': 271}