Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
- name: Run unit tests
run: make test
- name: Run e2e tests
run: make e2e
run: |
if [[ $GITHUB_REF_NAME == v* && $GITHUB_REF_TYPE == tag ]]; then
make e2e
else
make e2e-covdata
fi
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v3
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
bin/
vendor/
coverage.txt
test/e2e/coverage.txt
**/covcounters.*
**/covmeta.*
dist/
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ all: build
FORCE:

bin/%: cmd/% FORCE
go build $(GO_BUILD_FLAGS) -o $@ ./$<
go build $(GO_INSTRUMENT_FLAGS) $(GO_BUILD_FLAGS) -o $@ ./$<

.PHONY: download
download: ## download dependencies via go mod
Expand All @@ -48,7 +48,16 @@ test: vendor check-line-endings ## run unit tests
e2e: build ## build notation cli and run e2e test
NOTATION_BIN_PATH=`pwd`/bin/$(COMMANDS); \
cd ./test/e2e; \
./run.sh zot $$NOTATION_BIN_PATH
./run.sh zot $$NOTATION_BIN_PATH; \

.PHONY: e2e-covdata
e2e-covdata:
export GOCOVERDIR=$(CURDIR)/test/e2e/.cover; \
rm -rf $$GOCOVERDIR; \
mkdir -p $$GOCOVERDIR; \
export GO_INSTRUMENT_FLAGS='-coverpkg "github.com/notaryproject/notation/internal/...,github.com/notaryproject/notation/pkg/...,github.com/notaryproject/notation/cmd/..."'; \
$(MAKE) e2e; \
go tool covdata textfmt -i=$$GOCOVERDIR -o "$(CURDIR)/test/e2e/coverage.txt"

.PHONY: clean
clean:
Expand Down