diff --git a/.github/workflows/check-coverage b/.github/workflows/check-coverage index 9244270d60..896828fb17 100755 --- a/.github/workflows/check-coverage +++ b/.github/workflows/check-coverage @@ -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"