Skip to content

Commit

Permalink
Merge pull request #857 from parente/smarter-builds
Browse files Browse the repository at this point in the history
Build docs, images when appropriate
  • Loading branch information
parente authored May 4, 2019
2 parents ae5f7e1 + f1aa698 commit eae3068
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ install:
- make dev-env
script:
- set -e
- make docs
- make build-test-all DARGS="--build-arg TEST_ONLY_BUILD=1"
- if [ $(make n-docs-diff) -ne 0 ]; then make docs; fi;
- if [ $(make n-other-diff) -ne 0 ]; then make build-test-all DARGS="--build-arg TEST_ONLY_BUILD=1"; fi;
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ dev-env: ## install libraries required to build docs and run tests
docs: ## build HTML documentation
make -C docs html

n-docs-diff: ## number of docs/ files changed since branch from master
@git diff --name-only master...HEAD -- docs/ | wc -l | awk '{print $$1}'

n-other-diff: ## number of files outside docs/ changed since branch from master
@git diff --name-only master...HEAD -- ':!docs/' | wc -l | awk '{print $$1}'

test/%: ## run tests against a stack
@TEST_IMAGE="$(OWNER)/$(notdir $@)" pytest test

Expand Down

0 comments on commit eae3068

Please sign in to comment.