add support for beta version tag #359
Workflow file for this run
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: maven linux | |
on: | |
push: | |
branches-ignore: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
maven-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- java-version: "17" | |
java-distribution: "temurin" | |
steps: | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: ${{ matrix.java-distribution }} | |
- name: install Senzing runtime | |
uses: senzing-factory/github-action-install-senzing-sdk@v2 | |
with: | |
packages-to-install: "senzingsdk-runtime senzingsdk-setup" | |
senzingsdk-repository-package: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_PACKAGE }} | |
senzingsdk-repository-path: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_URL }} | |
- name: Build with Maven | |
run: | | |
mvn clean install -Pcheckstyle,jacoco,spotbugs -Djacoco.haltOnFailure=false -Djacoco.ignoreFailture=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/[email protected] | |
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@v7 | |
with: | |
script: | | |
core.setFailed('Overall coverage is less than 80%!') |