diff --git a/.travis.yml b/.travis.yml index b0151452..fe557c32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,8 +13,16 @@ matrix: notifications: email: false +cache: + directories: + - $HOME/.bzrepos + - $HOME/.cache/bazel + install: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget -N https://github.com/bazelbuild/bazel/releases/download/0.26.1/bazel-0.26.1-installer-linux-x86_64.sh && chmod +x bazel-0.26.1-installer-linux-x86_64.sh && ./bazel-0.26.1-installer-linux-x86_64.sh --user; go get -u github.com/swaggo/swag/cmd/swag; go mod download; fi script: - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make && make -f Makefile.bazel build; fi + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/Makefile b/Makefile index a56b7780..c5f8d7cb 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ debug: doc .PHONY: test test: - go test -v -race -cover ./pkg/... ./cmd/... + go test -v -race -cover -coverprofile=coverage.txt -covermode=atomic ./... ./bin/golangci-lint: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.17.1 diff --git a/Makefile.bazel b/Makefile.bazel index 22a1a1ab..a4f21743 100644 --- a/Makefile.bazel +++ b/Makefile.bazel @@ -1,6 +1,10 @@ OS := $(shell uname -s | tr A-Z a-z) BINARY_PREFIX_DIRECTORY := $(OS)_amd64_stripped BAZEL=$(HOME)/bin/bazel +BAZELOPTS= --repository_cache="$$HOME/.bzrepos" \ + --test_output=errors \ + --noshow_progress \ + --noshow_loading_progress .PHONY: all all: build check @@ -31,8 +35,8 @@ init: setup-base update-bazel fmt-bazel .PHONY: build build: - ${BAZEL} build //... - ${BAZEL} test //... + ${BAZEL} build ${BAZELOPTS} //... + ${BAZEL} test ${BAZELOPTS} //... .PHONY: check check: diff --git a/README.md b/README.md index 5f17d33b..3c5a4499 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# zot [![Build Status](https://travis-ci.org/anuvu/zot.svg?branch=master)](https://travis-ci.org/anuvu/zot) +# zot [![Build Status](https://travis-ci.org/anuvu/zot.svg?branch=master)](https://travis-ci.org/anuvu/zot) [![codecov.io](http://codecov.io/github/anuvu/zot/coverage.svg?branch=master)](http://codecov.io/github/anuvu/zot?branch=master) **zot** is a single-purpose OCI image repository server based on the [OCI distribution spec](https://github.com/opencontainers/distribution-spec). @@ -8,3 +8,9 @@ * TLS support * *Basic* and TLS mutual authentication * Swagger based documentation + +# Caveats + +* go 1.12+ +* Image name consists of only one path component, for example, _busybox:latest_ instead _ubuntu/busybox:latest_ +* The OCI distribution spec is still WIP, and we try to keep up