-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
59 lines (41 loc) · 2.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
SHELL := /bin/bash
DM_ENVIRONMENT ?= local
CONFIG := config/${DM_ENVIRONMENT}.sh
smoke-tests: setup
[ -f ${CONFIG} ] && . ${CONFIG} ; bundle exec cucumber --strict --tags @smoke-tests --tags ~@skip --tags ~@skip-${DM_ENVIRONMENT}
smoulder-tests: setup
[ -f ${CONFIG} ] && . ${CONFIG} ; bundle exec cucumber --strict --tags @smoulder-tests,@smoke-tests --tags ~@skip --tags ~@skip-${DM_ENVIRONMENT}
smoulder-tests-parallel: setup
[ -f ${CONFIG} ] && . ${CONFIG} ; bundle exec parallel_cucumber features/ -n 4 -o "--strict --tags @smoulder-tests,@smoke-tests --tags ~@skip --tags ~@skip-${DM_ENVIRONMENT} ${ARGS} -p run-parallel"
run: setup
[ -f ${CONFIG} ] && . ${CONFIG} ; bundle exec cucumber --strict --tags ~@skip --tags ~@skip-${DM_ENVIRONMENT} ${ARGS}
rerun:
[ -s reports/rerun ] || (echo "rerun file is empty or does not exist"; exit 1)
[ -f ${CONFIG} ] && . ${CONFIG} ; bundle exec cucumber --strict -p rerun
run-parallel: setup
[ -f ${CONFIG} ] && . ${CONFIG} ; bundle exec parallel_cucumber features/ -n 4 -o "--strict -t ~@skip -t ~@skip-${DM_ENVIRONMENT} ${ARGS} -p run-parallel"
build-report:
bundle exec report_builder -s 'reports' -o 'reports/index' -f html -t features,errors -T '<img src="https://media.giphy.com/media/sIIhZliB2McAo/giphy.gif">Functional Test Results'
setup: install config clean
mkdir -p reports/
install:
bundle config set path '.bundle';\
bundle config set without 'development';\
bundle install
.PHONY: config
config:
@[ -z "$${DM_API_DOMAIN}" ] && ${MAKE} ${CONFIG} || true
@[ -f ${CONFIG} ] && echo 'Using config from ${CONFIG}' || echo 'Using config from envvars'
@echo "Environment:" ${DM_ENVIRONMENT}
config/%.sh: config/%.example.sh
@[ -f ${CONFIG} ] || (echo "Copying example config" && cp $? $@)
clean:
rm -rf reports/
lint: install
bundle exec rubocop features
parse: install
[ -f ${CONFIG} ] && . ${CONFIG} ; bundle exec cucumber --strict --dry-run
index-services:
$(if ${FRAMEWORK},,$(error Must specify FRAMEWORK))
docker run --net=host digitalmarketplace/scripts scripts/index-to-search-service.py services dev --api-token=myToken --search-api-token=myToken --index=${FRAMEWORK} --frameworks=${FRAMEWORK}
.PHONY: smoke-tests run rerun run-parallel setup install clean index-services