-
Notifications
You must be signed in to change notification settings - Fork 181
62 lines (53 loc) · 1.59 KB
/
java-checkstyle.yml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Java checkstyle
on:
push:
branches:
- master
paths:
- 'java/**.java'
- 'java/**.xml'
- '.github/workflows/java-checkstyle.yml'
pull_request:
types:
- opened
- reopened
- synchronize
paths:
# We also trigger on non-java code changes since this triggers sonarcloud scanner after
- '**.py'
- 'web/html/src/**.ts'
- 'web/html/src/**.tsx'
- 'java/**.java'
- 'java/**.xml'
- '.github/workflows/java-checkstyle.yml'
jobs:
checkstyle:
runs-on: ubuntu-latest
container: registry.opensuse.org/systemsmanagement/uyuni/master/docker/containers/uyuni-master-pgsql:latest
steps:
- uses: actions/checkout@v4
- name: Cache dependencies
id: cache-dependencies
uses: actions/cache@v4
with:
path: java/lib
key: ${{ runner.os }}-java-lib-${{ hashFiles('java/buildconf/ivy/*.*') }}
- name: Resolve dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
ant -f java/manager-build.xml ivy
- name: Run checkstyle
run: ant -f java/manager-build.xml checkstyle
- name: Compress build results
run: tar cf java-build.tar.gz java/build java/lib
- name: Save PR data to file
run: |
echo "PR_NUMBER=${{ github.event.number }}" >>pr_data
echo "PR_BASE=${{ github.event.pull_request.base.ref }}" >>pr_data
- name: Archive Java build artifacts
uses: actions/upload-artifact@v4
with:
name: java-built-files
path: |
java-build.tar.gz
pr_data