From 3ba7599aa4ad5b6e476ba144166224eb9364ae98 Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Wed, 8 Sep 2021 00:05:11 +0200 Subject: [PATCH] GH actions: Archive complete logs on test failure https://docs.github.com/en/actions/reference/usage-limits-billing-and-administration#artifact-and-log-retention-policy > By default, the artifacts and log files generated by workflows are > retained for 90 days before they are automatically deleted. --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3812c60d..655382f5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,6 +60,12 @@ jobs: - name: run i3 tests run: | docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${{ env.BASENAME }} ./travis/run-tests.sh + - name: Archive test logs + uses: actions/upload-artifact@v2 + with: + name: test-logs + path: build/testsuite-* + if: ${{ failure() }} - name: build dist tarball run: | docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${{ env.BASENAME }} /bin/sh -c 'rm -rf distbuild; mkdir distbuild && cd distbuild && meson .. -Ddocs=true -Dmans=true && ninja -v dist'