From fce3129f6ea1b6062da1c46a133fd38e83480ba9 Mon Sep 17 00:00:00 2001 From: Annie Ke Date: Tue, 15 Jun 2021 12:18:09 -0700 Subject: [PATCH] feat[ci]: upload logs for sync tests if failure --- .github/workflows/sync-tests.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/sync-tests.yml b/.github/workflows/sync-tests.yml index b70e12a9bdab..bd031837cde8 100644 --- a/.github/workflows/sync-tests.yml +++ b/.github/workflows/sync-tests.yml @@ -42,3 +42,21 @@ jobs: run: | yarn yarn test:sync + + - name: Collect docker logs on failure + if: failure() + uses: jwalton/gh-docker-logs@v1 + with: + images: 'ethereumoptimism/builder,ethereumoptimism/hardhat,ethereumoptimism/deployer,ethereumoptimism/data-transport-layer,ethereumoptimism/l2geth,ethereumoptimism/message-relayer,ethereumoptimism/batch-submitter,ethereumoptimism/l2geth' + dest: './logs' + + - name: Tar logs + if: failure() + run: tar cvzf ./logs.tgz ./logs + + - name: Upload logs to GitHub + if: failure() + uses: actions/upload-artifact@master + with: + name: logs.tgz + path: ./logs.tgz