Skip to content

Support "dist" directory layout for szBuildVersion.json during product builds #1451

Support "dist" directory layout for szBuildVersion.json during product builds

Support "dist" directory layout for szBuildVersion.json during product builds #1451

Workflow file for this run

name: maven linux
on:
pull_request:
branches: [main]
schedule:
- cron: "15 7 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
cancel-in-progress: true
permissions: {}
jobs:
sdk-versions:
runs-on: ubuntu-latest
outputs:
senzingsdk-versions: ${{ steps.cfg.outputs.senzingsdk-versions }}
steps:
- id: cfg
uses: senzing-factory/build-resources/sdk-versions@v4
maven-linux:
needs: sdk-versions
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java-version: ["17", "21"]
java-distribution: ["temurin"]
senzingsdk-version: ${{ fromJSON(needs.sdk-versions.outputs.senzingsdk-versions) }}
steps:
- name: checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: ${{ matrix.java-distribution }}
- name: install Senzing runtime
uses: senzing-factory/github-action-install-senzing-sdk@v4
with:
packages-to-install: "senzingsdk-runtime senzingsdk-setup"
senzingsdk-version: ${{ matrix.senzingsdk-version }}
- name: Build with Maven
run: |
mvn clean install -Pcheckstyle,jacoco,spotbugs -Djacoco.haltOnFailure=false -Djacoco.ignoreFailure=true -Dsenzing.support.dir="/opt/senzing/data" -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: Jacoco Report to PR
id: jacoco
if: github.event_name == 'pull_request'
uses: madrapps/jacoco-report@v1.7.2
with:
paths: ${{ github.workspace }}/target/site/**/*.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
title: Code Coverage
update-comment: true
skip-if-no-changes: true
pass-emoji: ":green_circle:"
fail-emoji: ":red_circle:"
- name: Fail PR if overall coverage is less than 80%
if: ${{ github.event_name == 'pull_request' && steps.jacoco.outputs.coverage-overall < 80.0 }}
uses: actions/github-script@v8
with:
script: |
core.setFailed('Overall coverage is less than 80%!')
slack-notification:
needs: [maven-linux]
if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.maven-linux.result ) && github.event_name == 'schedule' }}
secrets:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
uses: senzing-factory/build-resources/.github/workflows/build-failure-slack-notification.yaml@v4
with:
job-status: ${{ needs.maven-linux.result }}