From 37517b0aa1f31aa9c96e316a7ea392601adf206d Mon Sep 17 00:00:00 2001 From: Stojan Dimitrovski Date: Tue, 24 Dec 2024 14:29:41 +0100 Subject: [PATCH] ci: fix coverage metering by removing files not under test --- .github/workflows/test.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 779e8d697c..dd71b76ec7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -65,6 +65,19 @@ jobs: run: make migrate_dev - name: Lint and test run: make test + - name: Cleanup coverage + run: | + set -x + + # since Go 1.20 these source files need to be deleted from the + # coverage profile as they contain legacy or untestable code (like + # `main` package) + + sed -i '/^github.com\/supabase\/auth\/client/d' coverage.out + sed -i '/^github.com\/supabase\/auth\/cmd/d' coverage.out + sed -i '/^github.com\/supabase\/auth\/docs/d' coverage.out + sed -i '/^github.com\/supabase\/auth\/main/d' coverage.out + - uses: shogo82148/actions-goveralls@v1 with: path-to-profile: coverage.out