<commit_before>name: CI

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        java-version: [ 8, 11, 16 ]
      fail-fast: false

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java-version }}
      - uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-          
      - run: mvn -B install --no-transfer-progress

  publish-snapshot:
    needs: build
    if: env.IS_SNAPSHOT
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Set up settings.xml for GitHub Packages
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Publish SNAPSHOT version to GitHub Packages (we can skip tests, since we only deploy, if the build workflow succeeded)
        run: mvn -v && mvn -B -P requireSnapshot --no-transfer-progress deploy -DskipTests
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    env:
      # Check if version is a SNAPSHOT - grep returns 0 if the pattern is found, otherwise 1
      IS_SNAPSHOT: $(grep -A 1 "<artifactId>kryo.*</artifactId>" pom.xml | grep SNAPSHOT)<commit_msg>Add GitHub actions for CI and PR builds<commit_after>name: CI

on:
  push:
    branches:
      - master

env:
  # Check if version is a SNAPSHOT - grep returns 0 if the pattern is found, otherwise 1
  IS_SNAPSHOT: $(grep -A 1 "<artifactId>kryo.*</artifactId>" pom.xml | grep SNAPSHOT)        

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        java-version: [ 8, 11, 16 ]
      fail-fast: false

    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-java@v1
        with:
          java-version: ${{ matrix.java-version }}
      - uses: actions/cache@v2
        with:
          path: ~/.m2/repository
          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
          restore-keys: |
            ${{ runner.os }}-maven-          
      - run: mvn -B install --no-transfer-progress

  publish-snapshot:
    needs: build
    if: env.IS_SNAPSHOT
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2

      - name: Set up settings.xml for GitHub Packages
        uses: actions/setup-java@v1
        with:
          java-version: 1.8

      - name: Publish SNAPSHOT version to GitHub Packages (we can skip tests, since we only deploy, if the build workflow succeeded)
        run: mvn -v && mvn -B -P requireSnapshot --no-transfer-progress deploy -DskipTests
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
{'fraction_non_alphanumeric': 0.11679884643114635, 'fraction_numerical': 0.011535688536409516, 'mean_word_length': 1.9710920770877944, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '2115305', 'n_tokens_mistral': 954, 'n_tokens_neox': 899, 'n_words': 252}