<commit_before>name: CI

on:
  push:
    branches:
      - '*'
    paths-ignore:
      - 'docs/**'
      - '**/*.md'
      - 'appveyor.xml'
  pull_request:
    branches:
      - '*'
    paths-ignore:
      - 'docs/**'
      - '**/*.md'
      - 'appveyor.xml'

# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners
# GitHub Actions does not support Docker, PostgreSQL server on Windows, macOS :(

jobs:
  code-style:
    name: 'Code style'
    runs-on: ubuntu-latest
    env:
      ACTIONS_STEP_DEBUG: true
      ACTIONS_RUNNER_DEBUG: true
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 50
    - name: 'Get test node ARCH'
      run: echo "::set-output name=arch_name::$(uname -i)"
      id: get_arch_name
    - name: 'Set up JDK 8'
      if: ${{ steps.get_arch_name.outputs.arch_name != 'aarch64' }}
      uses: actions/setup-java@v1
      with:
        java-version: 8
    - name: 'Setup JDK 8 on ARM64'
      if: ${{ steps.get_arch_name.outputs.arch_name == 'aarch64' }}
      uses: AdoptOpenJDK/install-jdk@v1
      with:
        impl: hotspot # or openj9
        version: '8'
        architecture: aarch64
    - uses: burrunan/gradle-cache-action@v1
      name: Verify code style
      env:
        S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
        S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
        JAVA_HOME: ${{ steps.setup_jdk_arm64.outputs.JAVA_HOME_ARM64 }}
      with:
        read-only: ${{ matrix.os == 'self-hosted' }}
        job-id: jdk8
        arguments: autostyleCheck checkstyleAll jandex

  linux-checkerframework:
    name: 'CheckerFramework'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 50
      - name: 'Get test node ARCH'
        run: echo "::set-output name=arch_name::$(uname -i)"
        id: get_arch_name
      - name: 'Set up JDK 11'
        uses: actions/setup-java@v1
        with:
          java-version: 11
      - uses: burrunan/gradle-cache-action@v1
        name: Run CheckerFramework
        env:
          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
        with:
          read-only: ${{ matrix.os == 'self-hosted' }}
          job-id: checker-jdk11
          arguments: --scan --no-parallel --no-daemon -PenableCheckerframework classes

  source-distribution-check:
    name: 'Source distribution (JDK 11)'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 50
      - name: Start PostgreSQL
        working-directory: docker/postgres-server
        run: docker-compose up -d && docker-compose logs
      - name: 'Set up JDK 11'
        uses: actions/setup-java@v1
        with:
          java-version: 11
      - uses: burrunan/gradle-cache-action@v1<commit_msg>test: Refactor checkstyle, checker framework jobs, and source-distribution check in main CI<commit_after>name: CI

on:
  push:
    branches:
      - '*'
    paths-ignore:
      - 'docs/**'
      - '**/*.md'
      - 'appveyor.xml'
  pull_request:
    branches:
      - '*'
    paths-ignore:
      - 'docs/**'
      - '**/*.md'
      - 'appveyor.xml'

# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners
# GitHub Actions does not support Docker, PostgreSQL server on Windows, macOS :(

jobs:
  code-style:
    name: 'Code style'
    runs-on: ubuntu-latest
    env:
      ACTIONS_STEP_DEBUG: true
      ACTIONS_RUNNER_DEBUG: true
    steps:
    - uses: actions/checkout@v2
      with:
        fetch-depth: 50
    - name: 'Set up JDK 8'
      uses: actions/setup-java@v2
      with:
        distribution: zulu
        java-version: 8
    - uses: burrunan/gradle-cache-action@v1
      name: Verify code style
      env:
        S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
        S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
      with:
        job-id: jdk8
        arguments: autostyleCheck checkstyleAll jandex

  linux-checkerframework:
    name: 'CheckerFramework'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 50
      - name: 'Set up JDK 11'
        uses: actions/setup-java@v2
        with:
          distribution: zulu
          java-version: 11
      - uses: burrunan/gradle-cache-action@v1
        name: Run CheckerFramework
        env:
          S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
          S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
        with:
          read-only: ${{ matrix.os == 'self-hosted' }}
          job-id: checker-jdk11
          arguments: --scan --no-parallel --no-daemon -PenableCheckerframework classes

  source-distribution-check:
    name: 'Source distribution (JDK 11)'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 50
      - name: Start PostgreSQL
        working-directory: docker/postgres-server
        run: docker-compose up -d && docker-compose logs
      - name: 'Set up JDK 11'
        uses: actions/setup-java@v2
        with:
          distribution: zulu
          java-version: 11
      - uses: burrunan/gradle-cache-action@v1
{'fraction_non_alphanumeric': 0.1153705732018985, 'fraction_numerical': 0.016794450529390288, 'mean_word_length': 2.1873182082606166, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '2069168', 'n_tokens_mistral': 1963, 'n_tokens_neox': 1854, 'n_words': 374}