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 the CI if tests emit log errors/warnings (#2694)
Adam Rutkowskief894b054627
diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.ymlindex 2b80d880dd..1b2e7e811d 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 | grep -P '\[(warning|error)\]' && echo "Log lines found. Capture log output in tests. Aborting." && exit 1 || exit 0- name: Check Dialyzerrun: mix dialyzerenv:diff --git a/test/workers/import_google_analytics_test.exs b/test/workers/import_google_analytics_test.exsindex dbea18b991..90185ffa79 100644--- a/test/workers/import_google_analytics_test.exs+++ b/test/workers/import_google_analytics_test.exs@@ -5,6 +5,8 @@ defmodule Plausible.Workers.ImportGoogleAnalyticsTest doalias Plausible.Workers.ImportGoogleAnalytics+ @moduletag capture_log: true+@imported_data %Plausible.Site.ImportedData{start_date: Timex.today() |> Timex.shift(days: -7),end_date: Timex.today(),