diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index af09c2c..c42b90a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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/cache@v4.0.2 @@ -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() diff --git a/setup/run-swagger-petstore.bat b/setup/run-swagger-petstore.bat index f9f6908..4cd7804 100644 --- a/setup/run-swagger-petstore.bat +++ b/setup/run-swagger-petstore.bat @@ -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 .