Skip to content

build(deps-dev): bump com.diffplug.spotless:spotless-maven-plugin from 3.8.0 to 3.9.0 #1341

build(deps-dev): bump com.diffplug.spotless:spotless-maven-plugin from 3.8.0 to 3.9.0

build(deps-dev): bump com.diffplug.spotless:spotless-maven-plugin from 3.8.0 to 3.9.0 #1341

Workflow file for this run

# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: [ main, 1.x ]
pull_request:
paths-ignore:
- 'material/**'
- 'docs/**'
- '**.md'
branches: [ main, 1.x ]
env:
# Quotes are here since Windows has issues with parsing of maven args with dots
mvn_options: --batch-mode -q "-Dstyle.color=always" "-Dorg.slf4j.simpleLogger.showDateTime=true" "-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss.SSS"
jdk_for_downstream: 17
os_for_downstream: ubuntu-latest
jobs:
build:
strategy:
matrix:
java-version: [ 17, 21, 25, 26 ]
runs-on: [ ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest ]
name: Jdk ${{ matrix.java-version }}, os ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v7
with:
# ratchetFrom needs history reachable to the base/before commit
fetch-depth: 0
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven
- name: Determine Spotless ratchet ref
shell: bash
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
ref="${{ github.event.pull_request.base.sha }}"
else
ref="${{ github.event.before }}"
[ "$ref" = "0000000000000000000000000000000000000000" ] && ref=""
fi
[ -n "$ref" ] && echo "RATCHET=-DratchetFrom=$ref" >> "$GITHUB_ENV"
- name: Build with Maven
run: ./mvnw $mvn_options install $RATCHET -PnoGpg --file pom.xml
- name: Run ProvidersDocsGenerator
if: ${{ matrix.java-version == env.jdk_for_downstream && matrix.runs-on == env.os_for_downstream }}
run: ./mvnw $mvn_options exec:java -Dexec.mainClass="net.datafaker.script.ProvidersDocsGenerator" -Dexec.classpathScope=test -PnoGpg --file pom.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v7.0.0
if: ${{ matrix.java-version == env.jdk_for_downstream && matrix.runs-on == env.os_for_downstream}}
with:
token: ${{ secrets.CODECOV_TOKEN }}
- id: version-extract
if: ${{ matrix.java-version == env.jdk_for_downstream && matrix.runs-on == env.os_for_downstream}}
run: |
echo "release_version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: 'Download downstream project'
if: ${{ matrix.java-version == env.jdk_for_downstream && matrix.runs-on == env.os_for_downstream}}
uses: actions/checkout@v7
with:
repository: datafaker-net/datafaker-gen
fetch-depth: 1
path: datafaker_gen
- name: 'Test with downstream project'
if: ${{ matrix.java-version == env.jdk_for_downstream && matrix.runs-on == env.os_for_downstream}}
run: cd datafaker_gen && ./mvnw clean install -Ddatafaker.version=${{ steps.version-extract.outputs.release_version }} -DskipBigQueryIntegrationTests=true
- name: 'Upload test results'
uses: actions/upload-artifact@v7
if: always()
with:
name: test-report-${{matrix.runs-on}}-${{matrix.java-version}}
retention-days: 14
path: |
**/target/site
**/target/surefire-reports