From 0b53ff416da5a2c82110b584f3d389e79f376915 Mon Sep 17 00:00:00 2001 From: Patrik Stas Date: Tue, 14 Nov 2023 00:54:17 +0100 Subject: [PATCH] Collect docker logs on mediator integration testing failure Signed-off-by: Patrik Stas --- .github/workflows/mediator.pr.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mediator.pr.yml b/.github/workflows/mediator.pr.yml index e93633ea6d..856110b1cb 100644 --- a/.github/workflows/mediator.pr.yml +++ b/.github/workflows/mediator.pr.yml @@ -26,7 +26,7 @@ jobs: test-integration-mediator: runs-on: ubuntu-22.04 - services: + services: mysql: image: mysql:latest env: @@ -53,4 +53,9 @@ jobs: - name: Setup database run: DATABASE_URL=${MYSQL_URL} sqlx migrate run --source agents/rust/mediator/mediation/migrations - name: "Run mediator integration tests" - run: cargo run --bin mediator & sleep 5 && cargo test --verbose --package mediator -- --nocapture; \ No newline at end of file + run: cargo run --bin mediator & sleep 5 && cargo test --verbose --package mediator -- --nocapture; + - name: "Collect docker logs on failure" + if: failure() + uses: ./.github/actions/upload-docker-logs + with: + name: "docker-services-${{ github.job }}"