Changes pertaining to bootstrap builds and enforciong szBuildVersion.json is correct at build time #796
Workflow file for this run
This file contains hidden or 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 windows | |
| on: | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: "15 7 * * *" | |
| workflow_dispatch: | |
| 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-windows: | |
| needs: sdk-versions | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| runs-on: windows-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 SDK | |
| uses: senzing-factory/github-action-install-senzing-sdk@v4 | |
| with: | |
| senzingsdk-version: ${{ matrix.senzingsdk-version }} | |
| - name: Add to "Path" environment variable | |
| run: | | |
| Add-Content $env:GITHUB_PATH "$Env:USERPROFILE\Senzing\er\lib" | |
| - name: Build with Maven | |
| run: | | |
| mvn clean install -B "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" -Pjacoco "-Djacoco.haltOnFailure=false" "-Djacoco.ignoreFailure=true" "-Dsenzing.path=$Env:USERPROFILE\Senzing" | |
| - name: Jacoco Report to PR | |
| id: jacoco | |
| 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: ${{ 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-windows] | |
| if: ${{ always() && contains(fromJSON('["failure", "cancelled"]'), needs.maven-windows.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-windows.result }} |