diff --git a/.github/workflows/archivematica-acceptance-tests.yml b/.github/workflows/archivematica-acceptance-tests.yml index 8945b3c0..9d8d5dec 100644 --- a/.github/workflows/archivematica-acceptance-tests.yml +++ b/.github/workflows/archivematica-acceptance-tests.yml @@ -121,6 +121,25 @@ jobs: -u ubuntu \ -e "archivematica_src_am_version=${{ env.am_version }} archivematica_src_ss_version=${{ env.ss_version }}" \ -vvv + - name: "Save logs" + if: "${{ failure() }}" + working-directory: "${{ github.workspace }}/tests/archivematica-acceptance-tests" + run: | + mkdir /tmp/logs + podman-compose exec --user root archivematica cp -r /var/log /tmp/logs + podman-compose exec --user root archivematica cp -r /etc /tmp/logs + podman-compose exec --user root archivematica cp -r /usr/lib/systemd /tmp/logs + podman-compose exec --user root archivematica journalctl --no-pager > /tmp/logs/journalctl.log + podman-compose exec --user root archivematica chown -R ubuntu:ubuntu /tmp/logs + podman cp archivematica-acceptance-test_archivematica_1:/tmp/logs/ /tmp/logs + sudo chown -R $USER /tmp/logs + tar -czf /tmp/logs.tar.gz /tmp/logs + - name: "Upload logs on failure" + if: "${{ failure() }}" + uses: "actions/upload-artifact@v4" + with: + name: "logs-${{ matrix.docker_image.label }}-${{ matrix.feature }}" + path: "/tmp/logs.tar.gz" - name: "Prepare the container for running the AMAUATs" working-directory: "${{ github.workspace }}/tests/archivematica-acceptance-tests" run: |