Skip to content

Commit 4a39147

Browse files
committed
chore: verify integration tests
1 parent cbfd04c commit 4a39147

File tree

10 files changed

+35
-9
lines changed

10 files changed

+35
-9
lines changed

.github/workflows/verify-examples.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
filters: |
1818
examples:
1919
- 'examples/**'
20+
integration-tests:
21+
- 'tests/integration/**'
2022
2123
verify-examples:
2224
needs: detect-changes
@@ -30,4 +32,28 @@ jobs:
3032
distribution: 'temurin'
3133
- name: verify examples
3234
working-directory: examples
33-
run: mvn clean install
35+
run: |
36+
mvn verify \
37+
-Dcom.expediagroup.xapjavasdk.apikey="${{ secrets.API_KEY }}" \
38+
-Dcom.expediagroup.xapjavasdk.apisecret="${{ secrets.API_SECRET }}" \
39+
-Dcom.expediagroup.xapjavasdk.vrbokey="${{ secrets.VRBO_KEY }}" \
40+
-Dcom.expediagroup.xapjavasdk.vrbosecret="${{ secrets.VRBO_SECRET }}" \
41+
42+
verify-integration-tests:
43+
needs: detect-changes
44+
if: ${{ needs.detect-changes.outputs.integration-tests == 'true' }}
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: actions/setup-java@v4
49+
with:
50+
java-version: '11'
51+
distribution: 'temurin'
52+
- name: verify integration tests
53+
working-directory: tests/integration
54+
run: |
55+
mvn verify \
56+
-Dcom.expediagroup.xapjavasdk.apikey="${{ secrets.API_KEY }}" \
57+
-Dcom.expediagroup.xapjavasdk.apisecret="${{ secrets.API_SECRET }}" \
58+
-Dcom.expediagroup.xapjavasdk.vrbokey="${{ secrets.VRBO_KEY }}" \
59+
-Dcom.expediagroup.xapjavasdk.vrbosecret="${{ secrets.VRBO_SECRET }}"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ and less on the technical details of the API.
1717
You can find code examples for multiple use cases in the [examples](examples) directory.
1818

1919
### Integration Tests
20-
Integration tests are placed in the [integrations](integrations) directory.
20+
Integration tests are placed in the [integrations](tests/integration) directory.
2121

2222
---
2323

@@ -27,4 +27,4 @@ If you have any questions or need help with XAP, please refer to the
2727
[XAP Support](https://developers.expediagroup.com/xap/support) page.
2828

2929
If you experience any issues with the SDK, please raise an issue on the
30-
[GitHub repository](https://github.com/ExpediaGroup/xap-java-sdk/issues).
30+
[GitHub repository](https://github.com/ExpediaGroup/xap-java-sdk/issues).
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ account manager.
8484
8585
## License
8686
87-
This project is licensed under the Apache License v2.0 - see the [LICENSE](../LICENSE) for details.
87+
This project is licensed under the Apache License v2.0 - see the [LICENSE](../../LICENSE) for details.

integrations/src/test/java/com/expediagroup/sdk/xap/integrations/common/Constant.java renamed to tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/common/Constant.java

File renamed without changes.

integrations/src/test/java/com/expediagroup/sdk/xap/integrations/common/XapIT.java renamed to tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/common/XapIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Extension for setting up the required components for testing.
1616
*/
1717
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
18-
public abstract class XapIT {
18+
public abstract class XapIntegrationTests {
1919

2020
protected static XapClient xapClient;
2121
protected static XapClient mockClient;

integrations/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/AvailabilityCalendarsIT.java renamed to tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/AvailabilityCalendarsIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* This class is used to test the integration of the Lodging Availability Calendars API.
3030
*/
31-
public class AvailabilityCalendarsIT extends VrboIT {
31+
public class AvailabilityCalendarsIntegrationTests extends VrboIntegrationTests {
3232

3333
@Test
3434
public void testRequest() {

integrations/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/ListingsIT.java renamed to tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/ListingsIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
/**
6363
* This class is used to test the integration of the Lodging Listings API.
6464
*/
65-
public class ListingsIT extends XapIT {
65+
public class ListingsIntegrationTests extends XapIntegrationTests {
6666

6767
@Test
6868
public void testRequest() {

integrations/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/QuotesIT.java renamed to tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/QuotesIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
/**
3636
* This class is used to test the integration of the Lodging Quotes API.
3737
*/
38-
public class QuotesIT extends VrboIT {
38+
public class QuotesIntegrationTests extends VrboIntegrationTests {
3939

4040
@Test
4141
public void testRequest() {

integrations/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/VrboIT.java renamed to tests/integration/src/test/java/com/expediagroup/sdk/xap/integrations/lodging/VrboIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Extension for setting up the required components for testing, specifically for Vrbo.
1010
*/
11-
public abstract class VrboIT extends XapIT {
11+
public abstract class VrboIntegrationTests extends XapIntegrationTests {
1212

1313
@BeforeAll
1414
static void vrboSetup() {

0 commit comments

Comments
 (0)