Skip to content

Commit 48e2a53

Browse files
Merge branch 'main' into simhuang/add-hotel-id-search-examples
2 parents a078d39 + aaa456a commit 48e2a53

File tree

354 files changed

+44096
-52
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

354 files changed

+44096
-52
lines changed

.github/workflows/generate-and-publish-sdk-sources.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
generate-and-publish-sources:
15-
uses: ExpediaGroup/expediagroup-java-sdk/.github/workflows/selfserve-full-workflow.yaml@v20241013
15+
uses: ExpediaGroup/expediagroup-java-sdk/.github/workflows/selfserve-full-workflow.yaml@v20241126
1616
secrets: inherit
1717
with:
1818
name: xap
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Integration Test
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
jdk:
7+
description: 'JDK version to use'
8+
required: true
9+
type: string
10+
distribution:
11+
description: 'JDK distribution to use'
12+
required: false
13+
type: string
14+
default: 'corretto'
15+
branch:
16+
description: 'Branch to build SDK and run integration tests from'
17+
required: true
18+
type: string
19+
20+
jobs:
21+
integration-tests:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout repo
25+
uses: actions/checkout@v4
26+
with:
27+
repository: 'ExpediaGroup/xap-java-sdk'
28+
ref: ${{ inputs.branch }}
29+
path: sdk-repo
30+
31+
- name: Parse SDK version
32+
id: parse-sdk-version
33+
working-directory: sdk-repo/code
34+
shell: python -u {0}
35+
run: |
36+
import os
37+
import xml.etree.ElementTree as ET
38+
39+
tree = ET.parse("pom.xml")
40+
root = tree.getroot()
41+
version = root.find("{*}version").text
42+
43+
with open(os.getenv("GITHUB_OUTPUT"), "a") as GITHUB_OUTPUT:
44+
print(f"version={version}", file=GITHUB_OUTPUT)
45+
46+
- name: Set up JDK
47+
uses: actions/setup-java@v4
48+
with:
49+
java-version: ${{ inputs.jdk }}
50+
distribution: ${{ inputs.distribution }}
51+
52+
- name: Install SDK
53+
working-directory: sdk-repo/code
54+
run: |
55+
mvn clean install
56+
57+
- name: Run Integration Tests
58+
working-directory: sdk-repo/integrations
59+
run: |
60+
mvn verify \
61+
-Dcom.expediagroup.xapjavasdk.apikey="${{ secrets.API_KEY }}" \
62+
-Dcom.expediagroup.xapjavasdk.apisecret="${{ secrets.API_SECRET }}" \
63+
-Dcom.expediagroup.xapjavasdk.vrbokey="${{ secrets.VRBO_KEY }}" \
64+
-Dcom.expediagroup.xapjavasdk.vrbosecret="${{ secrets.VRBO_SECRET }}" \
65+
-Dxap-java-sdk.sdk.version="${{ steps.parse-sdk-version.outputs.version }}"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Auto First Approval for Bot PRs
2+
on: pull_request
3+
4+
jobs:
5+
auto-first-approve:
6+
runs-on: ubuntu-latest
7+
permissions:
8+
pull-requests: write
9+
contents: read
10+
if: github.actor == 'dependabot[bot]' || github.actor == 'renovate[bot]'
11+
steps:
12+
- name: Provide first approval
13+
uses: hmarr/auto-approve-action@v4
14+
with:
15+
github-token: ${{ secrets.GITHUB_TOKEN }}
16+
review-message: "Renovate and Dependabot PRs are automatically approved. Still requires human review."

.github/workflows/release-sdk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
jdk: ${{ matrix.jdk }}
2323

2424
release-sdk:
25-
uses: ExpediaGroup/expediagroup-java-sdk/.github/workflows/selfserve-release-sdk.yaml@v20241013
25+
uses: ExpediaGroup/expediagroup-java-sdk/.github/workflows/selfserve-release-sdk.yaml@v20241126
2626
needs: [ run-examples ]
2727
secrets: inherit
2828
with:

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ and less on the technical details of the API.
1616

1717
You can find code examples for multiple use cases in the [examples](examples) directory.
1818

19+
### Integration Tests
20+
Integration tests are placed in the [integrations](integrations) directory.
21+
1922
---
2023

2124
## Support

code/LICENSE-HEADER.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (C) 2022 Expedia, Inc.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

code/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Welcome to the xap-sdk SDK!
2+
3+
## Usage
4+
```xml
5+
<dependency>
6+
<groupId>com.expediagroup</groupId>
7+
<artifactId>xap-sdk</artifactId>
8+
<version>1.0.0</version>
9+
</dependency>
10+
```
11+
12+
## License
13+
14+
This project is licensed under the Apache License v2.0 - see the [LICENSE](LICENSE) for details.

0 commit comments

Comments
 (0)