-
Notifications
You must be signed in to change notification settings - Fork 88
52 lines (42 loc) · 1.48 KB
/
build-lint-test.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
name: Java Build, Lint and Test
on:
push:
jobs:
build-test-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Xero-Java repo
uses: actions/checkout@v4
with:
repository: XeroAPI/Xero-Java
path: Xero-Java
- name: Set up JDK environment
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: maven
- name: Import GPG Key
run: |
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY}}
- name: Set up Node environment
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install Prism
run: npm install -g @stoplight/prism-cli
- name: Start PRISM Server
run: ./start-prism.sh & sleep 15
working-directory: Xero-Java/src/test/java/com/xero/api/util
- name: Build and test post generation
run: |
export GPG_TTY=$(tty)
mvn clean verify
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
working-directory: Xero-Java
- name: Stop PRISM
run: pkill -f prism
working-directory: Xero-Java