Skip to content

Commit

Permalink
Configure petstore SUT in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
javiertuya committed Jul 12, 2024
1 parent bb63bef commit b10c6c3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ jobs:
java-version: '8'
cache: 'maven'

- name: Launch Petstore
if: ${{ matrix.scope == 'Petstore' }}
working-directory: ./sut-petstore
run: |
mvn package -DskipTests=true -ntp
docker build -t swagger-petstore .
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"
- run: docker ps

- name: Rules cache
id: rules-cache
uses: actions/[email protected]
Expand All @@ -37,10 +48,13 @@ jobs:
key: cache-${{ matrix.scope }}-v1-${{ github.run_id }}
restore-keys: cache-${{ matrix.scope }}-v1-

- name: Test and aggregate surefire report
- name: Test All
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn test -pl st-tdg-test -Dtest=**/*Local* -Dmaven.test.failure.ignore=true -U --no-transfer-progress
run: mvn test -pl st-tdg-test -Dtest=**/*${{ matrix.scope }}* -Dmaven.test.failure.ignore=true -U --no-transfer-progress

- if: ${{ matrix.scope == 'Petstore' }}
run: docker logs swagger-petstore > st-tdg-test/target/docker-petstore-server.log

- name: Generate report checks
if: always()
Expand Down
2 changes: 1 addition & 1 deletion setup/run-swagger-petstore.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo on
SET PETSTORE_DIR=%~dp0%\..\swagger-petstore-main-fork
SET PETSTORE_DIR=%~dp0%\..\sut-petstore
cd %PETSTORE_DIR%
cmd /c mvn package -DskipTests=true
docker build -t swagger-petstore .
Expand Down

0 comments on commit b10c6c3

Please sign in to comment.