From 0190614342344cc5000ae2a97abe5f6cc6bb3d07 Mon Sep 17 00:00:00 2001 From: mmetc <92726601+mmetc@users.noreply.github.com> Date: Wed, 13 Apr 2022 15:03:37 +0200 Subject: [PATCH] show crowdsec logs after the tests (#1439) --- .github/workflows/bats-mysql.yml | 5 +++++ .github/workflows/bats-postgres.yml | 5 +++++ .github/workflows/bats-sqlite-coverage.yml | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/.github/workflows/bats-mysql.yml b/.github/workflows/bats-mysql.yml index cd905239a..3f95c40f6 100644 --- a/.github/workflows/bats-mysql.yml +++ b/.github/workflows/bats-mysql.yml @@ -65,6 +65,11 @@ jobs: MYSQL_PASSWORD: ${{ secrets.DATABASE_PASSWORD }} MYSQL_USER: root + - name: "Show crowdsec logs" + run: + for file in $(find ./tests/local/var/log -type f); do echo ">>>>> $file"; cat $file; echo; done + if: ${{ always() }} + - name: "Show database logs" run: docker logs "${{ job.services.database.id }}" if: ${{ always() }} diff --git a/.github/workflows/bats-postgres.yml b/.github/workflows/bats-postgres.yml index f63aaca9b..95f0d95a3 100644 --- a/.github/workflows/bats-postgres.yml +++ b/.github/workflows/bats-postgres.yml @@ -84,6 +84,11 @@ jobs: PGPASSWORD: ${{ secrets.DATABASE_PASSWORD }} PGUSER: postgres + - name: "Show crowdsec logs" + run: + for file in $(find ./tests/local/var/log -type f); do echo ">>>>> $file"; cat $file; echo; done + if: ${{ always() }} + - name: "Show database logs" run: docker logs "${{ job.services.database.id }}" if: ${{ always() }} diff --git a/.github/workflows/bats-sqlite-coverage.yml b/.github/workflows/bats-sqlite-coverage.yml index 055c688bb..669039a32 100644 --- a/.github/workflows/bats-sqlite-coverage.yml +++ b/.github/workflows/bats-sqlite-coverage.yml @@ -45,3 +45,9 @@ jobs: with: name: coverage-bats.out path: ./tests/local/var/lib/coverage/coverage-bats.out + + - name: "Show crowdsec logs" + run: + for file in $(find ./tests/local/var/log -type f); do echo ">>>>> $file"; cat $file; echo; done + if: ${{ always() }} +