Skip to content

Commit 67800cf

Browse files
authored
Merge pull request #379 from XeroAPI/PETOSS-528-Create-GitHub-actions-for-validating-PR-in-Java-SDK-repo_new
PETOSS-528 Create GitHub actions for validating PR in Java SDK repo
2 parents f3635d3 + d5af82c commit 67800cf

File tree

2 files changed

+42
-4
lines changed

2 files changed

+42
-4
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Java Build, Lint and Test
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
build-test-lint:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout Xero-Java repo
12+
uses: actions/checkout@v4
13+
with:
14+
repository: XeroAPI/Xero-Java
15+
path: Xero-Java
16+
17+
- name: Set up JDK environment
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: 'temurin'
21+
java-version: '11'
22+
cache: maven
23+
24+
- name: Import GPG Key
25+
run: |
26+
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --batch --import
27+
env:
28+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY}}
29+
30+
- name: Build and test post generation
31+
run: |
32+
export GPG_TTY=$(tty)
33+
mvn clean verify -DskipTests=true -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
34+
working-directory: Xero-Java

pom.xml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@
166166
<artifactId>maven-compiler-plugin</artifactId>
167167
<version>3.6.1</version>
168168
<configuration>
169-
<source>1.8</source>
170-
<target>1.8</target>
169+
<source>11</source>
170+
<target>11</target>
171171
</configuration>
172172
</plugin>
173173
<plugin>
@@ -257,7 +257,11 @@
257257
<goal>sign</goal>
258258
</goals>
259259
<configuration>
260-
<passphraseServerId>gpg.passphrase</passphraseServerId>
260+
<gpgArguments>
261+
<arg>--pinentry-mode</arg>
262+
<arg>loopback</arg>
263+
</gpgArguments>
264+
<passphraseServerId>gpg.passphrase</passphraseServerId>
261265
</configuration>
262266
</execution>
263267
</executions>
@@ -311,7 +315,7 @@
311315
<github.global.server>github</github.global.server>
312316
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
313317
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
314-
<java.version>1.8</java.version>
318+
<java.version>11</java.version>
315319
<swagger-annotations-version>1.6.3</swagger-annotations-version>
316320
<google-api-client-version>2.3.0</google-api-client-version>
317321
<jersey-common-version>2.25.1</jersey-common-version>

0 commit comments

Comments
 (0)