From d5af82cf94b8b54f5c134b596311ab4c9b6100cd Mon Sep 17 00:00:00 2001 From: Vignesh Kennadi Date: Tue, 10 Sep 2024 11:42:59 +0530 Subject: [PATCH] PETOSS-528 Create GitHub actions for validating PR in Java SDK repo --- .github/workflows/build-lint-test.yml | 34 +++++++++++++++++++++++++++ pom.xml | 12 ++++++---- 2 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build-lint-test.yml diff --git a/.github/workflows/build-lint-test.yml b/.github/workflows/build-lint-test.yml new file mode 100644 index 00000000..ab8afd94 --- /dev/null +++ b/.github/workflows/build-lint-test.yml @@ -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 diff --git a/pom.xml b/pom.xml index 32d61671..d58e56fd 100644 --- a/pom.xml +++ b/pom.xml @@ -166,8 +166,8 @@ maven-compiler-plugin 3.6.1 - 1.8 - 1.8 + 11 + 11 @@ -257,7 +257,11 @@ sign - gpg.passphrase + + --pinentry-mode + loopback + + gpg.passphrase @@ -311,7 +315,7 @@ github UTF-8 UTF-8 - 1.8 + 11 1.6.3 2.3.0 2.25.1