Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PETOSS-528 Create GitHub actions for validating PR in Java SDK repo #379

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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