From 2067ab042710f9dcccc9426576bca232a2b05f24 Mon Sep 17 00:00:00 2001 From: mmetc <92726601+mmetc@users.noreply.github.com> Date: Fri, 25 Nov 2022 12:02:38 +0100 Subject: [PATCH] CI: print stack traces (#1886) --- .github/workflows/bats-mysql.yml | 7 +++++-- .github/workflows/bats-postgres.yml | 7 +++++-- .github/workflows/bats-sqlite-coverage.yml | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/bats-mysql.yml b/.github/workflows/bats-mysql.yml index 4987cc298..023a128fb 100644 --- a/.github/workflows/bats-mysql.yml +++ b/.github/workflows/bats-mysql.yml @@ -86,9 +86,12 @@ jobs: MYSQL_USER: root if: ${{ always() }} + - name: "Show stack traces" + run: for file in $(find /tmp/crowdsec-crash.*.txt); do echo ">>>>> $file"; cat $file; echo; done + if: ${{ always() }} + - name: "Show crowdsec logs" - run: - for file in $(find ./tests/local/var/log -type f); do echo ">>>>> $file"; cat $file; echo; done + run: for file in $(find ./tests/local/var/log -type f); do echo ">>>>> $file"; cat $file; echo; done if: ${{ always() }} - name: "Show database logs" diff --git a/.github/workflows/bats-postgres.yml b/.github/workflows/bats-postgres.yml index 80be5bff4..9e7190eed 100644 --- a/.github/workflows/bats-postgres.yml +++ b/.github/workflows/bats-postgres.yml @@ -89,9 +89,12 @@ jobs: # PGPASSWORD: "secret" # PGUSER: postgres + - name: "Show stack traces" + run: for file in $(find /tmp/crowdsec-crash.*.txt); do echo ">>>>> $file"; cat $file; echo; done + if: ${{ always() }} + - name: "Show crowdsec logs" - run: - for file in $(find ./tests/local/var/log -type f); do echo ">>>>> $file"; cat $file; echo; done + run: for file in $(find ./tests/local/var/log -type f); do echo ">>>>> $file"; cat $file; echo; done if: ${{ always() }} - name: "Show database logs" diff --git a/.github/workflows/bats-sqlite-coverage.yml b/.github/workflows/bats-sqlite-coverage.yml index 36d2a112f..fd497f13d 100644 --- a/.github/workflows/bats-sqlite-coverage.yml +++ b/.github/workflows/bats-sqlite-coverage.yml @@ -62,9 +62,12 @@ jobs: sqlite3 ./tests/local/var/lib/crowdsec/data/crowdsec.db '.dump' if: ${{ always() }} + - name: "Show stack traces" + run: for file in $(find /tmp/crowdsec-crash.*.txt); do echo ">>>>> $file"; cat $file; echo; done + if: ${{ always() }} + - name: "Show crowdsec logs" - run: - for file in $(find ./tests/local/var/log -type f); do echo ">>>>> $file"; cat $file; echo; done + run: for file in $(find ./tests/local/var/log -type f); do echo ">>>>> $file"; cat $file; echo; done if: ${{ always() }} - name: Upload crowdsec coverage to codecov