Set buffersize to 100MB #538
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Analyze, Build and Deploy | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
env: | |
JDK_VERSION: 11 | |
jobs: | |
safety-check: | |
name: Check for modified Gradle | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Validate Gradle artifacts | |
uses: gradle/wrapper-validation-action@v1 | |
detekt: | |
name: Generate Detekt report | |
needs: safety-check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Required for version number generation | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: temurin | |
java-version: ${{ env.JDK_VERSION }} | |
- name: Run Detekt | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: detekt | |
- name: Collect results | |
shell: sh | |
run: > | |
mkdir sarif && | |
find * -name detekt.sarif -print0 | | |
xargs -n1 -0 bash -c 'cp "$1" "sarif/${1//\//-}"' '{}' | |
- name: Upload analysis results | |
uses: github/codeql-action/upload-sarif@v1 | |
with: | |
sarif_file: sarif | |
wait-for-processing: true | |
kover: | |
name: Generate Kover report | |
needs: safety-check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Required for version number generation | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: temurin | |
java-version: ${{ env.JDK_VERSION }} | |
- name: Run Kover | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: koverReport koverMergedReport | |
- name: Upload analysis results | |
uses: codecov/codecov-action@v2 | |
with: | |
directory: 'build/reports/kover' | |
fail_ci_if_error: true | |
verbose: true | |
junit-test: | |
name: Run JUnit tests | |
needs: safety-check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Required for version number generation | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: temurin | |
java-version: ${{ env.JDK_VERSION }} | |
- name: Run tests | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: test | |
- name: Upload test results | |
uses: mikepenz/action-junit-report@v2 | |
if: always() # Must execute after failed tests | |
with: | |
report_paths: '**/build/test-results/test/TEST-*.xml' | |
platform-test: | |
name: Run JUnit tests on ${{ matrix.os }} | |
needs: junit-test | |
strategy: | |
matrix: | |
os: [ macos-latest, windows-latest ] # Ubuntu is tested in "test" job | |
fail-fast: false # Ensure we get all failures on other platforms | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Required for version number generation | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: temurin | |
java-version: ${{ env.JDK_VERSION }} | |
- name: Run tests | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: test | |
# publish: | |
# name: Publish to Maven Central | |
# if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }} | |
# needs: [ spotless, platform-test ] | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v2 | |
# with: | |
# fetch-depth: 0 # Required for version number generation | |
# | |
# - name: Set up JDK | |
# uses: actions/setup-java@v2 | |
# with: | |
# distribution: temurin | |
# java-version: ${{ env.JDK_VERSION }} | |
# | |
# - name: Import GPG key | |
# id: importGPG | |
# uses: crazy-max/ghaction-import-gpg@v4 | |
# with: | |
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
# | |
# - name: Publish artifacts on Maven Central | |
# uses: gradle/gradle-build-action@v2 | |
# with: | |
# arguments: | | |
# -Psigning.keyId=${{ steps.importGPG.outputs.keyid }} | |
# -PsonatypeUsername=${{ secrets.SONATYPE_USERNAME }} | |
# -PsonatypePassword=${{ secrets.SONATYPE_PASSWORD }} | |
# publishToSonatype | |
# closeSonatypeStagingRepository | |
# | |
# - name: Create issue for finalizing release | |
# uses: JasonEtco/create-an-issue@v2 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# filename: contrib/release-staging.md |