Skip to content

Commit 048b4c2

Browse files
committed
added docker compose file for restful ecommerce, updated testng.xml and maven.yml to run restfulecommerce tests in github actions
1 parent 6a90974 commit 048b4c2

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

.github/workflows/maven.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
- name: Start restful booker service
3838
run: docker compose -f ./docker-compose-restfulbooker.yml up -d
3939

40+
- name: Start restful e-commerce service
41+
run: docker compose -f ./docker-compose-ecommerce.yml up -d
42+
4043
- name: Build Project
4144
run: mvn clean install -DskipTests
4245

@@ -46,6 +49,9 @@ jobs:
4649
- name: Stop restful booker service
4750
run: docker compose -f ./docker-compose-restfulbooker.yml down --remove-orphans
4851

52+
- name: Stop restful ecommerce service
53+
run: docker compose -f ./docker-compose-ecommerce.yml down --remove-orphans
54+
4955
- name: Test Reporter
5056
uses: dorny/test-reporter@v1.6.0
5157
if: always()

docker-compose-ecommerce.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# To execute this docker-compose yml file use `docker compose -f docker-compose-ecommerce.yml up -d`
2+
# Add the `-d` flag at the end for detached execution
3+
# To stop the execution, hit Ctrl+C, and then `docker compose -f docker-compose-ecommerce.yml down`
4+
services:
5+
restful-ecommerce:
6+
image: mfaisalkhatri/restful-ecommerce
7+
ports:
8+
- 3004:3004

test-suite/testng.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
<suite-files>
55
<suite-file path="testng-reqres.xml"/>
66
<suite-file path="testng-restfulbooker.xml"/>
7+
<suite-file path="testng-restfulecommerce.xml"/>
78
</suite-files>
89
</suite>

0 commit comments

Comments
 (0)