Some checks are pending
Docs Deploy / build_and_deploy (push) Waiting to run
Generate Docs / cli (push) Waiting to run
Generate Config Doc / cli (push) Waiting to run
Go formatting / go-formatting (push) Waiting to run
Check links / markdown-link-check (push) Waiting to run
Integration / pre-test (push) Waiting to run
Integration / test on (push) Blocked by required conditions
Integration / status (push) Blocked by required conditions
Lint / Lint Go code (push) Waiting to run
Test / test (ubuntu-latest) (push) Waiting to run
20 lines
829 B
Bash
Executable file
20 lines
829 B
Bash
Executable file
#!/bin/bash
|
|
set -e -x
|
|
|
|
go test -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=./... $(go list github.com/ignite/cli/v29/ignite/...)
|
|
|
|
# append "||true" to grep so if no match the return code stays 0
|
|
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER' || true)"
|
|
excludelist+=" $(find ./ -type f -name '*.pb.go')"
|
|
excludelist+=" $(find ./ -type f -name '*.pb.gw.go')"
|
|
excludelist+=" $(find ./actions -type d)"
|
|
excludelist+=" $(find ./assets -type d)"
|
|
excludelist+=" $(find ./docs -type d)"
|
|
excludelist+=" $(find ./integration -type d)"
|
|
excludelist+=" $(find ./scripts -type d)"
|
|
for filename in ${excludelist}; do
|
|
filename=${filename#".//"}
|
|
echo "Excluding ${filename} from coverage report..."
|
|
filename=$(echo "$filename" | sed 's/\//\\\//g')
|
|
sed -i.bak "/""$filename""/d" coverage.txt
|
|
done
|