Skip to content

Commit

Permalink
make coverage ignore list easier to manage as a list; target codegen/…
Browse files Browse the repository at this point in the history
…testserver gen files more closely
  • Loading branch information
phughes-scwx committed Dec 6, 2024
1 parent e975926 commit 2869023
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion .github/workflows/check-coverage
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,28 @@ go test -covermode atomic -coverprofile=/tmp/coverage.out.tmp -coverpkg=./... $(
# ignore protobuf files
cat /tmp/coverage.out.tmp | grep -v ".pb.go" > /tmp/coverage.out

goveralls -coverprofile=/tmp/coverage.out -service=github -ignore='_examples/*/*,_examples/*/*/*,integration/*,integration/*/*,codegen/testserver/*/*,plugin/resolvergen/testdata/*/*,plugin/modelgen/*/*,plugin/federation/testdata/*/*/*,*/generated.go,*/*/generated.go,*/*/*/generated.go,graphql/executable_schema_mock.go'
join () {
local IFS="$1"
shift
echo "$*"
}

ignore_list=(
'_examples/*/*'
'_examples/*/*/*'
'integration/*'
'integration/*/*'
'codegen/testserver/**/*generated*'
'codegen/testserver/**/models-gen.go'
'codegen/testserver/**/resolver.go'
'plugin/resolvergen/testdata/*/*'
'plugin/modelgen/*/*'
'plugin/federation/testdata/*/*/*'
'*/generated.go'
'*/*/generated.go'
'*/*/*/generated.go'
'graphql/executable_schema_mock.go'
)
ignore=$(join , "${ignore_list[@]}")

goveralls -coverprofile=/tmp/coverage.out -service=github "-ignore=$ignore"

0 comments on commit 2869023

Please sign in to comment.