Skip to content

Commit

Permalink
make it pass and not skip
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Apr 28, 2020
1 parent f17dd97 commit ba619cc
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ jobs:
- name: build
run: |
make build
- name: check diff
run: |
git diff-tree --no-commit-id --name-only -r HEAD~1..HEAD | grep '.go' &>/dev/null || ( echo "skipping" ; exit 0 )
- uses: technote-space/get-diff-action@v1
id: git_diff
with:
SUFFIX_FILTER: |
.go
.mod
.sum
- name: test & coverage report creation
run: |
go test ./... -mod=readonly -timeout 12m -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')"
Expand All @@ -37,7 +42,9 @@ jobs:
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
fail_ci_if_error: true
if: "env.GIT_DIFF != ''"

0 comments on commit ba619cc

Please sign in to comment.