@@ -212,6 +212,8 @@ jobs:
212212
213213 - name : Install dependencies for integration testing
214214 if : success() && matrix.type == 'integration-test'
215+ env :
216+ BOINC_INTEGRATION_LOG_DIR : ${{ runner.temp }}/integration-test-logs
215217 run : |
216218 sudo apt-get install ansible
217219 sudo service mysql stop
@@ -445,8 +447,43 @@ jobs:
445447
446448 - name : Execute integration-test
447449 if : success() && matrix.type == 'integration-test'
450+ env :
451+ BOINC_INTEGRATION_LOG_DIR : ${{ runner.temp }}/integration-test-logs
448452 run : ./tests/integration_test/executeTestSuite.sh
449453
454+ - name : Collect integration-test docker logs
455+ if : ${{ always() && matrix.type == 'integration-test' }}
456+ env :
457+ BOINC_INTEGRATION_LOG_DIR : ${{ runner.temp }}/integration-test-logs
458+ run : |
459+ mkdir -p "$BOINC_INTEGRATION_LOG_DIR"
460+
461+ if [ -d /tmp/boinc-server-docker ]; then
462+ cd /tmp/boinc-server-docker
463+
464+ if ! docker compose ps -a > "$BOINC_INTEGRATION_LOG_DIR/docker-compose-ps.txt" 2>&1; then
465+ echo "docker compose ps -a failed while collecting integration-test diagnostics" >> "$BOINC_INTEGRATION_LOG_DIR/docker-compose-ps.txt"
466+ fi
467+
468+ if ! docker compose logs --no-color > "$BOINC_INTEGRATION_LOG_DIR/docker-compose.log" 2>&1; then
469+ echo "docker compose logs failed while collecting integration-test diagnostics" >> "$BOINC_INTEGRATION_LOG_DIR/docker-compose.log"
470+ fi
471+ else
472+ echo "/tmp/boinc-server-docker was not created" > "$BOINC_INTEGRATION_LOG_DIR/docker-compose.log"
473+ fi
474+
475+ if ! docker ps -a > "$BOINC_INTEGRATION_LOG_DIR/docker-ps.txt" 2>&1; then
476+ echo "docker ps -a failed while collecting integration-test diagnostics" >> "$BOINC_INTEGRATION_LOG_DIR/docker-ps.txt"
477+ fi
478+
479+ - name : Upload integration-test docker logs
480+ if : ${{ always() && matrix.type == 'integration-test' }}
481+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
482+ with :
483+ name : linux_integration_test_docker_logs_${{ github.sha }}
484+ path : ${{ runner.temp }}/integration-test-logs
485+ if-no-files-found : warn
486+
450487 - name : Prepare logs on failure
451488 if : ${{ failure() }}
452489 run : python ./deploy/prepare_deployment.py logs
0 commit comments