diff --git a/.travis.yml b/.travis.yml index cc4a83796..3a4a2d3c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,18 +4,15 @@ services: - docker before_script: - - docker-compose -f docker-compose.travis.yml up -d --build + - ci_env=`bash <(curl -s https://codecov.io/env)` + - docker-compose $ci_env -f docker-compose.travis.yml up -d --build script: - - docker-compose -f docker-compose.travis.yml exec photoprism make migrate test-coverage + - docker-compose -f docker-compose.travis.yml exec photoprism make migrate test-codecov after_script: - - docker cp $(docker-compose ps -q photoprism):/go/src/github.com/photoprism/photoprism/coverage.txt coverage.txt - docker-compose -f docker-compose.travis.yml down -after_success: - - bash <(curl -s https://codecov.io/bash) - deploy: provider: script script: make docker-push diff --git a/Makefile b/Makefile index 372370eb0..2e8998ac8 100644 --- a/Makefile +++ b/Makefile @@ -40,9 +40,10 @@ test: $(GOTEST) -timeout 20m -v ./internal/... test-race: $(GOTEST) -race -timeout 60m -v ./internal/... -test-coverage: +test-codecov: $(GOTEST) -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./internal/... -test-coverage-html: + bash <(curl -s https://codecov.io/bash) +test-coverage: $(GOTEST) -timeout 30m -coverprofile=coverage.txt -covermode=atomic -v ./internal/... $(GOTOOL) cover -html=coverage.txt -o coverage.html clean: