Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #156 from Financial-Times/review-app-run-fix
Browse files Browse the repository at this point in the history
Allow test review app to be overridden (3rd time lucky)
  • Loading branch information
taktran authored Dec 11, 2018
2 parents 9d5a88f + c5e1804 commit ef037ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 23 deletions.
17 changes: 0 additions & 17 deletions src/setup.mk
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,6 @@ ASSERT_ANY_VAR_EXISTS = $(if $(findstring $(call _SORT_VARS_LIST,$1),$(call _MIS
$(call ERROR, $(call COLOR, At least one of the variables {cyan $(strip $1)} must be defined in your Makefile))\
)

# functions for testing review or local apps

# this file is created by the `review-app` task. if it exists it contains the name of
# the review app on heroku
REVIEW_APP=$(shell cat .review-app)

# url to smoke/a11y test. prefer test url set externally
ifndef TEST_URL
TEST_URL = $(if $(CIRCLE_BRANCH),\
http://$(REVIEW_APP).herokuapp.com,\
https://local.ft.com:5050\
)
endif

# exported for pa11y-ci's benefit
export TEST_URL

#
# META TASKS
# (specially-named targets that enable certain Make behaviour)
Expand Down
18 changes: 12 additions & 6 deletions src/tasks/review-app.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# this file is created by the `review-app` task.
# if it exists it contains the name of the review app
# on heroku
REVIEW_APP_FILE := .review-app

tidy-review-app:
-rm .review-app
-rm $(REVIEW_APP_FILE)

review-app: tidy-review-app .review-app

Expand All @@ -13,9 +18,10 @@ review-app: tidy-review-app .review-app
--github-token $(GITHUB_AUTH_TOKEN) > $@

gtg-review-app: review-app
nht gtg $(REVIEW_APP)
nht gtg $$(cat $(REVIEW_APP_FILE))

test-review-ap%:
make gtg-review-app
make smoke
make a11y
test-review-ap%: # test-review-app: create and test a review app on heroku
$(MAKE) gtg-review-app
TEST_URL="http://$$(cat $(REVIEW_APP_FILE)).herokuapp.com" \
$(MAKE) smoke a11y
@$(DONE)

0 comments on commit ef037ee

Please sign in to comment.