Skip to content

fix release detection script #34

fix release detection script

fix release detection script #34

name: "01 - Run unit tests and lint Java code"
on:
workflow_dispatch:
pull_request:
jobs:
test_and_lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: ./scripts/is_release.sh >> $GITHUB_OUTPUT
id: build
- run: echo $OUTPUTS
env:
OUTPUTS: ${{ steps.build.outputs.release }}
if: ${{ steps.build.outputs.release == 'true' }}
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "corretto"
cache: "gradle"
- uses: gradle/actions/setup-gradle@v4
- run: ./gradlew test lint checkstyleMain checkstyleTest jar
- run: ls -al build/libs
- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Publish Checkstyle report
uses: Juuxel/publish-checkstyle-report@v1
if: ${{ failure() || success() }}
with:
# required: The glob paths to report XML files as a multiline string
# The format below works for the Gradle Checkstyle plugin with default configurations
reports: |
build/reports/checkstyle/*.xml