name: CI

on:
  push:
    branches:
    - master
  pull_request: {}

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        java_version: [8, 11]
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK ${{ matrix.java_version }}
      uses: actions/setup-java@v1
      with:
        java-version: ${{ matrix.java_version }}
    - uses: actions/cache@v2
      with:
        path: |
          ~/.gradle/caches
          ~/.gradle/wrapper
        key: ${{ runner.os }}-${{ matrix.java_version }}-gradle-${{ hashFiles('**/*.gradle*') }}
    - name: Grant execute permission for gradlew
      run: chmod +x gradlew
    - name: Run tests
      run: ./gradlew check jacocoTestReport coveralls --stacktrace --info
    - name: Run tests using real Fluentd
      run: |
        ./gradlew publishToMavenLocal --stacktrace --info
        sudo gem install fluentd --no-doc
        echo "127.0.0.1 my-server" | sudo tee -a /etc/hosts
        cd tests/mutual-tls && ./run.sh


name: CI

on:
  push:
    branches:
    - master
  pull_request: {}

jobs:
  build:
    # With ubuntu-latest (20.04), some tests using self signed SSL cert suddenly failed at version 20210614.1.
    # The issue may be fixed later, but I'll use ubuntu-18.04 for a while as a workaround.
    runs-on: ubuntu-18.04
    strategy:
      matrix:
        java_version: [8, 11]
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK ${{ matrix.java_version }}
      uses: actions/setup-java@v1
      with:
        java-version: ${{ matrix.java_version }}
    - uses: actions/cache@v2
      with:
        path: |
          ~/.gradle/caches
          ~/.gradle/wrapper
        key: ${{ runner.os }}-${{ matrix.java_version }}-gradle-${{ hashFiles('**/*.gradle*') }}
    - name: Grant execute permission for gradlew
      run: chmod +x gradlew
    - name: Run tests
      run: ./gradlew check jacocoTestReport coveralls --stacktrace --info
    - name: Run tests using real Fluentd
      run: |
        ./gradlew publishToMavenLocal --stacktrace --info
        sudo gem install fluentd --no-doc
        echo "127.0.0.1 my-server" | sudo tee -a /etc/hosts
        cd tests/mutual-tls && ./run.sh


Use ubuntu-18.04 in GitHub Actions CI test
Use ubuntu-18.04 in GitHub Actions CI test
