Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Fail CI when tests are logging (#2748)
Adam05d14774be83
diff --git a/.github/bin/log-watch.sh b/.github/bin/log-watch.shnew file mode 100755index 0000000000..046481353b--- /dev/null+++ b/.github/bin/log-watch.sh@@ -0,0 +1,20 @@+#!/bin/sh+fail=false+while read l+do+ echo "$l"+ if echo "$l" | grep -qP '\[(warning|error)\]'+ then+ fail=true;+ fi+done++if [ $fail = true ]+then+ echo+ echo "💀 The tests are logging, please capture logs. See:"+ echo " - https://hexdocs.pm/ex_unit/1.12/ExUnit.CaptureLog.html"+ echo " - https://hexdocs.pm/ex_unit/1.12/ExUnit.Case.html#module-known-tags"+ echo+ exit 1+fidiff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.ymlindex 540b8a47c0..444fecd84b 100644--- a/.github/workflows/elixir.yml+++ b/.github/workflows/elixir.yml@@ -71,7 +71,7 @@ jobs:- name: Check Credo Warningsrun: mix credo diff --from-git-merge-base origin/master- name: Run tests- run: mix test --include slow --max-failures 1 --warnings-as-errors+ run: mix test --include slow --max-failures 1 --warnings-as-errors | .github/bin/log-watch.sh- name: Check Dialyzerrun: mix dialyzerenv: