Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a41fb46
chore: refactor integration tests in a gradle module
Mohammad-Dwairi May 14, 2025
9302487
chore: update gh action for verification
Mohammad-Dwairi May 14, 2025
fcb8f37
chore: update gh action for verification
Mohammad-Dwairi May 14, 2025
e57a191
chore: bump version
Mohammad-Dwairi May 16, 2025
57a832b
chore: fix verify-examples-and-tests action
Mohammad-Dwairi May 16, 2025
0e1f46f
chore: cleanups
Mohammad-Dwairi May 16, 2025
7d0a03e
chore: use the merged specs
Mohammad-Dwairi May 17, 2025
d05952e
chore: replace post-processor with codegen
Mohammad-Dwairi May 18, 2025
338c512
chore: replace post-processor with codegen
Mohammad-Dwairi May 18, 2025
85efc7d
fix: publish snapshot action command
Mohammad-Dwairi May 18, 2025
835ffd8
chore: cleanup LocalDateTimeModelProcessor.kt
Mohammad-Dwairi May 18, 2025
7e3d3e1
chore: cleanup LocalDateTimeOperationParamsProcessor.kt
Mohammad-Dwairi May 18, 2025
ea48e9c
chore: cleanup RoomsOperationParamsProcessor.kt
Mohammad-Dwairi May 18, 2025
ed74427
chore: cleanup LocalDateTimeOperationParamsProcessor.kt
Mohammad-Dwairi May 18, 2025
a72c343
chore: cleanup
Mohammad-Dwairi May 18, 2025
b265404
chore: format
Mohammad-Dwairi May 18, 2025
b3e6dcf
chore: update openapi plugin version
Mohammad-Dwairi May 18, 2025
ba4733a
test: use MockTransport for integration tests
Mohammad-Dwairi May 18, 2025
f0168ec
feat: removed the builder method from XapClient
Mohammad-Dwairi May 18, 2025
847d4a0
chore: remove unused rooms_builder.mustache
Mohammad-Dwairi May 18, 2025
9b9f566
chore: format
Mohammad-Dwairi May 18, 2025
ca9b756
chore: improve readme file
Mohammad-Dwairi May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 0 additions & 44 deletions .github/workflows/generate-and-publish-sdk-sources.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/integration-tests.yaml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/release-sdk-snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Snapshot Release

on:
workflow_dispatch:

jobs:
run-e2e-examples:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Run Examples
uses: ./.github/workflows/run-examples.yaml
with:
branch: 'v2-dev' # TODO: Update to main
jdk: '8'

run-integration-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Run Examples
uses: ./.github/workflows/run-integration-tests.yaml
with:
branch: 'v2-dev' # TODO: Update to main
jdk: '8'

release:
runs-on: ubuntu-latest
needs: [run-e2e-examples, run-integration-tests]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: v2-dev # TODO: Update to main

- name: Publish SDK
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
./gradlew :xap-sdk:publishSnapshots
48 changes: 48 additions & 0 deletions .github/workflows/release-sdk-stable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Stable Release

on:
workflow_dispatch:

jobs:
run-e2e-examples:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Run Examples
uses: ./.github/workflows/run-examples.yaml
with:
branch: 'v2-dev' # TODO: Update to main
jdk: '8'

run-integration-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: Run Examples
uses: ./.github/workflows/run-integration-tests.yaml
with:
branch: 'v2-dev' # TODO: Update to main
jdk: '8'

release:
runs-on: ubuntu-latest
needs: [run-e2e-examples, run-integration-tests]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: v2-dev # TODO: Update to main

- name: Publish SDK
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
GPG_SECRET: ${{ secrets.GPG_PRIVATE_KEY }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
./gradlew :xap-sdk:publishToSonatype closeAndReleaseSonatypeStagingRepository
37 changes: 0 additions & 37 deletions .github/workflows/release-sdk.yaml

This file was deleted.

48 changes: 14 additions & 34 deletions .github/workflows/run-examples.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Run Examples

on:
workflow_call:
inputs:
workflow_dispatch:
inputs: &shared_inputs
jdk:
description: 'JDK version to use'
required: true
Expand All @@ -16,50 +17,29 @@ on:
required: true
type: string

workflow_call:
inputs: *shared_inputs

jobs:
run-examples:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
- name: Checkout Repo
uses: actions/checkout@v4
with:
repository: 'ExpediaGroup/xap-java-sdk'
ref: ${{ inputs.branch }}
path: sdk-repo

- name: Parse SDK version
id: parse-sdk-version
working-directory: sdk-repo/code
shell: python -u {0}
run: |
import os
import xml.etree.ElementTree as ET

tree = ET.parse("pom.xml")
root = tree.getroot()
version = root.find("{*}version").text

with open(os.getenv("GITHUB_OUTPUT"), "a") as GITHUB_OUTPUT:
print(f"version={version}", file=GITHUB_OUTPUT)

- name: Set up JDK
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.jdk }}
distribution: ${{ inputs.distribution }}

- name: Install SDK
working-directory: sdk-repo/code
run: |
mvn clean install

- name: Run Examples
working-directory: sdk-repo/examples
env:
XAP_KEY: "${{ secrets.API_KEY }}"
XAP_SECRET: "${{ secrets.API_SECRET }}"
VRBO_KEY: "${{ secrets.VRBO_KEY }}"
VRBO_SECRET: "${{ secrets.VRBO_SECRET }}"
run: |
mvn install exec:java \
-Dexec.mainClass="com.expediagroup.sdk.xap.examples.XapSdkDemoTestRun" \
-Dcom.expediagroup.xapjavasdk.apikey="${{ secrets.API_KEY }}" \
-Dcom.expediagroup.xapjavasdk.apisecret="${{ secrets.API_SECRET }}" \
-Dcom.expediagroup.xapjavasdk.vrbokey="${{ secrets.VRBO_KEY }}" \
-Dcom.expediagroup.xapjavasdk.vrbosecret="${{ secrets.VRBO_SECRET }}" \
-Dxap-java-sdk.sdk.version="${{ steps.parse-sdk-version.outputs.version }}"
./gradlew :examples:run
40 changes: 40 additions & 0 deletions .github/workflows/run-integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Integration Tests

on:
workflow_dispatch:
inputs: &shared_inputs
jdk:
description: 'JDK version to use'
required: true
type: string
distribution:
description: 'JDK distribution to use'
required: false
type: string
default: 'corretto'
branch:
description: 'Branch to build SDK and run examples from'
required: true
type: string

workflow_call:
inputs: *shared_inputs

jobs:
integration-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ inputs.jdk }}
distribution: ${{ inputs.distribution }}

- name: Run Integration Tests
run: |
./gradlew :integration-tests:test
Loading