Skip to content

Commit

Permalink
Merge pull request #379 from XeroAPI/PETOSS-528-Create-GitHub-actions…
Browse files Browse the repository at this point in the history
…-for-validating-PR-in-Java-SDK-repo_new

PETOSS-528 Create GitHub actions for validating PR in Java SDK repo
  • Loading branch information
vigneshk-tw authored Sep 11, 2024
2 parents f3635d3 + d5af82c commit 67800cf
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 4 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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: Build and test post generation
run: |
export GPG_TTY=$(tty)
mvn clean verify -DskipTests=true -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }}
working-directory: Xero-Java
12 changes: 8 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -257,7 +257,11 @@
<goal>sign</goal>
</goals>
<configuration>
<passphraseServerId>gpg.passphrase</passphraseServerId>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
<passphraseServerId>gpg.passphrase</passphraseServerId>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -311,7 +315,7 @@
<github.global.server>github</github.global.server>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<java.version>11</java.version>
<swagger-annotations-version>1.6.3</swagger-annotations-version>
<google-api-client-version>2.3.0</google-api-client-version>
<jersey-common-version>2.25.1</jersey-common-version>
Expand Down

0 comments on commit 67800cf

Please sign in to comment.