| 1 |
# Licensed to the Apache Software Foundation (ASF) under one or more |
| 2 |
# contributor license agreements. See the NOTICE file distributed with |
| 3 |
# this work for additional information regarding copyright ownership. |
| 4 |
# The ASF licenses this file to You under the Apache License, Version 2.0 |
| 5 |
# (the "License"); you may not use this file except in compliance with |
| 6 |
# the License. You may obtain a copy of the License at |
| 7 |
# |
| 8 |
# https://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
# |
| 10 |
# Unless required by applicable law or agreed to in writing, software |
| 11 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
# See the License for the specific language governing permissions and |
| 14 |
# limitations under the License. |
| 15 |
|
| 16 |
name: 'Spotless' |
| 17 |
on: |
| 18 |
workflow_dispatch: |
| 19 |
push: |
| 20 |
branches: [ main ] |
| 21 |
pull_request: |
| 22 |
branches: [ main ] |
| 23 |
paths: |
| 24 |
- .github/workflows/spotless.yml |
| 25 |
- lang/java/** |
| 26 |
|
| 27 |
concurrency: |
| 28 |
group: ${{ github.workflow }}-${{ github.ref }} |
| 29 |
cancel-in-progress: true |
| 30 |
|
| 31 |
jobs: |
| 32 |
spotless: |
| 33 |
runs-on: ubuntu-latest |
| 34 |
steps: |
| 35 |
- uses: actions/checkout@v5 |
| 36 |
|
| 37 |
- name: Cache Local Maven Repository |
| 38 |
uses: actions/cache@v4 |
| 39 |
with: |
| 40 |
path: ~/.m2/repository |
| 41 |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
| 42 |
restore-keys: | |
| 43 |
${{ runner.os }}-maven- |
| 44 |
|
| 45 |
- name: 'Setup Temurin JDK 8, 11, 17 & 21' |
| 46 |
uses: actions/setup-java@v5 |
| 47 |
with: |
| 48 |
distribution: 'temurin' |
| 49 |
java-version: | |
| 50 |
8 |
| 51 |
11 |
| 52 |
17 |
| 53 |
21 |
| 54 |
|
| 55 |
- name: 'Setup Maven 3.9.6' |
| 56 |
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5 |
| 57 |
with: |
| 58 |
maven-version: 3.9.6 |
| 59 |
|
| 60 |
- name: Run Spotless Check |
| 61 |
run: mvn spotless:check |