-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (33 loc) · 1.04 KB
/
checkstyle.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# SPDX-License-Identifier: Apache-2.0 OR MIT
#
# SPDX-FileCopyrightText: Copyright 2021 Micron Technology, Inc.
name: checkstyle
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "**.java"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
permissions: {}
jobs:
checkstyle:
runs-on: ubuntu-latest
steps:
- name: Checkout hse-java
uses: actions/checkout@v3
- name: Export Maven local repository
id: maven-local-repository
run: |
local_repository=$(mvn help:evaluate -Dexpression=settings.localRepository --quiet -DforceStdout)
echo "local-repository=$local_repository" >> "$GITHUB_OUTPUT"
- name: Cache Maven dependencies
id: maven-dependencies
uses: actions/cache@v3
with:
path: ${{ steps.maven-local-repository.outputs.local-repository }}
key: maven-dependencies-${{ hashFiles('pom.xml') }}
- name: checkstyle
run: |
mvn checkstyle:check