<commit_before>name: CI
on: [push, pull_request]

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        jdk: [openjdk@1.8]
        scala: [2.11.12, 2.12.12, 2.13.3]

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Set up Scala
        uses: olafurpg/setup-scala@v7
        with:
          java-version: ${{ matrix.jdk }}

      - name: Check formatting
        run: sbt "++${{ matrix.scala }} scalafmtCheckAll; scalafmtSbtCheck"

      - name: Compile
        run: sbt coverage "++${{ matrix.scala }} compile"

      - name: Run tests
        run: sbt coverage "++${{ matrix.scala }} test"

      - name: Upload coverage data to Coveralls
        run: sbt ++${{ matrix.scala }} coverageAggregate coveralls
        env:
          COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COVERALLS_FLAG_NAME: Scala ${{ matrix.scala }}

      - name: Build Scaladoc
        run: sbt "++${{ matrix.scala }} doc"

      - name: Publish artifact locally
        run: sbt "++${{ matrix.scala }} publishLocal"

      - name: Compile example project
        run: cd example && sbt "++${{ matrix.scala }} test"

      - name: Check mdoc output
        if: startsWith(matrix.scala, '2.12')
        run: >
          sbt ++${{ matrix.scala }} mdoc &&
          git diff --exit-code

  build_website:
    name: Build Website
    runs-on: ubuntu-latest
    env:
      NOKOGIRI_USE_SYSTEM_LIBRARIES: true

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Set up Scala
        uses: olafurpg/setup-scala@v7
        with:
          java-version: openjdk@1.8

      - name: Set up Ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: 2.6

      - name: Install dependencies
        run: >
          sudo apt install libxslt-dev &&
          gem install sass jekyll:4.0.0 html-proofer:3.9.3

      - name: Build website
        run: sbt makeMicrosite

      - name: Verify website
        run: >
          htmlproofer
          --allow-hash-href
          --url-swap "https\://github\.com/pureconfig/pureconfig/tree/master:file\://$(pwd)"
          --url-ignore "/search.maven.org/"
          docs/target/site

  diff_website:
    name: Diff Website
    runs-on: ubuntu-latest
    if: github.event_name == 'pull_request' && github.base_ref == 'master'

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Set up Scala
        uses: olafurpg/setup-scala@v7
        with:
          java-version: openjdk@1.8

      - name: Set up Ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: 2.6

      - name: Install dependencies
        run: gem install sass jekyll:4.0.0<commit_msg>Update the olafurpg/setup-scala GitHub action to v10 (#872)<commit_after>name: CI
on: [push, pull_request]

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        jdk: [adopt@1.8]
        scala: [2.11.12, 2.12.12, 2.13.3]

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Set up Scala
        uses: olafurpg/setup-scala@v10
        with:
          java-version: ${{ matrix.jdk }}

      - name: Check formatting
        run: sbt "++${{ matrix.scala }} scalafmtCheckAll; scalafmtSbtCheck"

      - name: Compile
        run: sbt coverage "++${{ matrix.scala }} compile"

      - name: Run tests
        run: sbt coverage "++${{ matrix.scala }} test"

      - name: Upload coverage data to Coveralls
        run: sbt ++${{ matrix.scala }} coverageAggregate coveralls
        env:
          COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          COVERALLS_FLAG_NAME: Scala ${{ matrix.scala }}

      - name: Build Scaladoc
        run: sbt "++${{ matrix.scala }} doc"

      - name: Publish artifact locally
        run: sbt "++${{ matrix.scala }} publishLocal"

      - name: Compile example project
        run: cd example && sbt "++${{ matrix.scala }} test"

      - name: Check mdoc output
        if: startsWith(matrix.scala, '2.12')
        run: >
          sbt ++${{ matrix.scala }} mdoc &&
          git diff --exit-code

  build_website:
    name: Build Website
    runs-on: ubuntu-latest
    env:
      NOKOGIRI_USE_SYSTEM_LIBRARIES: true

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Set up Scala
        uses: olafurpg/setup-scala@v10
        with:
          java-version: adopt@1.8

      - name: Set up Ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: 2.6

      - name: Install dependencies
        run: >
          sudo apt install libxslt-dev &&
          gem install sass jekyll:4.0.0 html-proofer:3.9.3

      - name: Build website
        run: sbt makeMicrosite

      - name: Verify website
        run: >
          htmlproofer
          --allow-hash-href
          --url-swap "https\://github\.com/pureconfig/pureconfig/tree/master:file\://$(pwd)"
          --url-ignore "/search.maven.org/"
          docs/target/site

  diff_website:
    name: Diff Website
    runs-on: ubuntu-latest
    if: github.event_name == 'pull_request' && github.base_ref == 'master'

    steps:
      - name: Checkout repository
        uses: actions/checkout@v2

      - name: Set up Scala
        uses: olafurpg/setup-scala@v10
        with:
          java-version: adopt@1.8

      - name: Set up Ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: 2.6

      - name: Install dependencies
        run: gem install sass jekyll:4.0.0
{'fraction_non_alphanumeric': 0.11803220668908158, 'fraction_numerical': 0.016988143691382056, 'mean_word_length': 1.8459214501510575, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3676415', 'n_tokens_mistral': 1956, 'n_tokens_neox': 1805, 'n_words': 448}