forked from coinbase/x402
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 888 Bytes
/
java.yml
File metadata and controls
42 lines (35 loc) · 888 Bytes
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
name: Java CI
on:
pull_request:
paths:
- 'java/**'
push:
branches: [ main ]
paths:
- 'java/**'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Maven dependencies
uses: actions/cache@v4
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