Skip to content

Commit

Permalink
Configure market SUT in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
javiertuya committed Jul 12, 2024
1 parent 3201cc3 commit 660145e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
if: (github.event_name != 'pull_request' && ! github.event.pull_request.head.repo.fork) || (github.event_name == 'pull_request' && (github.event.pull_request.head.repo.fork || startsWith(github.head_ref, 'dependabot/')))
strategy:
matrix:
scope: [Petstore]
scope: [Petstore, Market]
fail-fast: false

steps:
Expand All @@ -38,6 +38,17 @@ jobs:
docker run -d -p 8081:8080 --name swagger-petstore swagger-petstore
chmod u+x ../setup/wait-container-ready.sh
../setup/wait-container-ready.sh swagger-petstore "public ResponseContext findPetsByCategoryAndStatus"
- name: Launch Market
if: ${{ matrix.scope == 'Market' }}
working-directory: ./sut-market
run: |
mvn package -DskipTests=true -ntp
docker build -t market-rest --build-arg module=market-rest .
docker build -t market-web --build-arg module=market-web .
docker-compose -f docker-compose.yaml up -d
chmod u+x ../setup/wait-container-ready.sh
../setup/wait-container-ready.sh db "ready for start up"
../setup/wait-container-ready.sh market-rest "Started RestApplication"
- run: docker ps

- name: Rules cache
Expand All @@ -55,6 +66,10 @@ jobs:

- if: ${{ matrix.scope == 'Petstore' }}
run: docker logs swagger-petstore > st-tdg-test/target/docker-petstore-server.log
- if: ${{ matrix.scope == 'Market' }}
run: |
docker logs market-rest > st-tdg-test/target/docker-market-server.log
docker logs db > st-tdg-test/target/docker-market-db.log
- name: Generate report checks
if: always()
Expand Down
2 changes: 1 addition & 1 deletion setup/run-market.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo on
SET MARKET_DIR=%~dp0%\..\swagger-market-fork
SET MARKET_DIR=%~dp0%\..\sut-market
cd %MARKET_DIR%
cmd /c mvn package -DskipTests=true
docker build -t market-web --build-arg module=market-web .
Expand Down

0 comments on commit 660145e

Please sign in to comment.