diff --git a/.github/workflows/built_and_test.yml b/.github/workflows/built_and_test.yml index 72f545f97..0171655f9 100644 --- a/.github/workflows/built_and_test.yml +++ b/.github/workflows/built_and_test.yml @@ -483,13 +483,17 @@ jobs: DATABASE_IMAGE_NAME: ${{ matrix.databaseImageName }} run: make test SUITE=${{ matrix.suite }} - - name: Report + - name: Report Selenium if: always() run: | cd test/reporter npm install SUITE=${{ matrix.suite }} node report.js + - name: docker logs + if: always() + run: test/docker_logs.sh + - name: Archive docker test artifacts uses: actions/upload-artifact@v3 if: always() @@ -529,6 +533,10 @@ jobs: timeout-minutes: 10 run: make test-upgrade VERSION=${{ matrix.version }} TO_VERSION=${{ env.env_file }} + - name: docker logs + if: always() + run: test/docker_logs.sh + - name: Archive docker test artifacts uses: actions/upload-artifact@v3 if: always() @@ -565,6 +573,10 @@ jobs: timeout-minutes: 10 run: make test-upgrade VERSION=${{ matrix.version }} TO_VERSION=${{ env.env_file }} + - name: docker logs + if: always() + run: test/docker_logs.sh + - name: Archive docker test artifacts uses: actions/upload-artifact@v3 if: always() diff --git a/test/docker_logs.sh b/test/docker_logs.sh new file mode 100755 index 000000000..184a9693c --- /dev/null +++ b/test/docker_logs.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# run `docker logs` for all containers +# Used in CI for outputing all logs when a run has failed +set -e + +for container in $(docker ps --all | awk '{if(NR>1) print $NF}') +do + echo "Container: $container" + docker logs "$container" +done \ No newline at end of file