Skip to content

Commit

Permalink
test: workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
emidev98 committed Sep 4, 2023
1 parent 0e18c8a commit 11b234a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,9 @@ jobs:
- name: test & coverage report creation
run: |
go test ./... -mod=readonly -timeout 12m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock'
go test -mod=readonly -timeout 10m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...
if: env.GIT_DIFF

- name: filter out DONTCOVER
run: |
excludelist="$(find ./ -type f -name '*.go' | xargs grep -l 'DONTCOVER')"
excludelist+=" $(find ./ -type f -name '*.pb.go')"
for filename in ${excludelist}; do
filename=$(echo $filename | sed 's/^./github.com\/terra-money\/core\/v2/g')
echo "Excluding ${filename} from coverage report..."
sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt
done
if: env.GIT_DIFF


- uses: codecov/codecov-action@v1
with:
file: ./coverage.txt # optional
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ test-race:
@VERSION=$(VERSION) go test -mod=readonly -race -tags='ledger test_ledger_mock' ./...

test-cover:
@go test -mod=readonly -timeout 30m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...
@go test -mod=readonly -timeout 10m -race -coverprofile=coverage.txt -covermode=atomic -tags='ledger test_ledger_mock' ./...

benchmark:
@go test -mod=readonly -bench=. ./...
Expand Down

0 comments on commit 11b234a

Please sign in to comment.