fix(deps): bump net.javacrumbs.json-unit:json-unit-assertj #11773
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
# This workflow builds, tests, and releases the modules. | |
name: Java CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
# build library | |
build: | |
name: build (${{matrix.java_version}}, ${{ startsWith(matrix.os, 'windows-') && 'windows-latest' || 'ubuntu-latest' }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# always run all tests to avoid having different amounts of tests. | |
fail-fast: false | |
matrix: | |
java_version: ['17', '21'] | |
os: ['ubuntu-22.04', 'windows-2022'] | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
fetch-depth: 0 # fetch commit log so that Sonar is able to assign committers to issues | |
- name: Set up JDK ${{ matrix.java_version }} | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java_version }} | |
cache: 'gradle' | |
- name: Test with Gradle | |
uses: nick-invision/retry@7152eba30c6575329ac0576536151aca5a72780e # v2 | |
with: | |
timeout_minutes: 30 | |
max_attempts: 5 | |
retry_wait_seconds: 10 | |
warning_on_retry: false | |
command: ./gradlew --parallel --continue check -x spotlessCheck | |
- name: Generate Test Report | |
if: always() | |
run: ./gradlew -x test testReport codeCoverageReport | |
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
if: always() | |
with: | |
# keep latest suffix for subsequent workflows | |
name: ${{ startsWith(matrix.os, 'windows-') && 'windows-latest' || 'ubuntu-latest' }}-${{ matrix.java_version }}-test-results | |
path: | | |
build/reports/ | |
*/build/test-results/**/*.xml | |
*/build/classes/ | |
retention-days: 7 | |
publish-test-results: | |
name: "Publish Unit Tests Results" | |
timeout-minutes: 60 | |
needs: build | |
runs-on: ubuntu-latest | |
# Don't run for forks and dependabot because of missing secrets | |
if: (success() || failure()) && !(github.event.pull_request && github.event.pull_request.head.repo.fork) && github.actor != 'dependabot[bot]' | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v3 | |
with: | |
path: artifacts | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0 | |
with: | |
junit_files: artifacts/**/build/test-results/**/*.xml | |
# create release and publish the artifacts | |
semantic-release: | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
needs: build | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v3 | |
with: | |
node-version: 14 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
cache: 'gradle' | |
- name: Install Semantic release | |
run: | | |
sudo npm install -g \ | |
[email protected] \ | |
@semantic-release/[email protected] \ | |
@semantic-release/[email protected] \ | |
@semantic-release/[email protected] | |
- name: Release and Publish | |
run: semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.NEXUS_LOGIN_TOKEN }} |