forked from x402-foundation/x402
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.05 KB
/
Copy pathjava.yml
File metadata and controls
46 lines (38 loc) · 1.05 KB
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
name: Java CI
on:
pull_request:
paths:
- 'java/**'
push:
branches: [ main ]
paths:
- 'java/**'
workflow_dispatch:
permissions:
contents: read
id-token: none
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 17
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Maven dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Run tests with coverage
working-directory: ./java
run: mvn clean test -Pcoverage
- name: Run checkstyle
working-directory: ./java
run: mvn checkstyle:check
- name: Run SpotBugs
working-directory: ./java
run: mvn spotbugs:check