-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp-tests-dev
executable file
·57 lines (47 loc) · 1.51 KB
/
php-tests-dev
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
#!/usr/bin/env sh
# Disable source following.
# shellcheck disable=SC1090,SC1091
. php-dev-helper_loader
. "${INCLUDERS_DIR}/include_pts.sh"
func_print_header "PHP Tests and Analysis tool"
pts_show_project_type_and_name
pts_show_selected_options
### Testing
if [ "${COMMON_EXECUTE}" -eq "${CR_TRUE}" ]; then
pts_check_container
pts_check_vendor_dir
core_set_terminal_title "${TERM_TITLE} - Testing..."
console_debug "Executing..."
if [ "${PTS_CONTAINER_STARTED:-${CR_FALSE}}" -eq "${CR_TRUE}" ]; then
console_comment "${EMOJI_ROCKET}Processing...."
_phpunit_exec
_var_dump_check_exec
_php_metrics_exec
_php_md_exec
_phpstan_exec
_psalm_exec
_php_security_exec
_php_cs_exec
_php_cs_bf_exec
_php_dependency_graph
_multi_tester_exec
if [ "${PTS_METRICS}" -eq "${CR_TRUE}" ] \
|| [ "${PTS_PHPUNIT_COVERAGE}" -eq "${CR_TRUE}" ] \
|| [ "${PTS_DEPS_GRAPH}" -eq "${CR_TRUE}" ] \
; then
if [ -e "${PTS_TEST_REPORT_INDEX}" ]
then
console_print ""
console_debug "Report file found: '${PTS_TEST_REPORT_INDEX}'"
else
console_comment "Generating report file: '${PTS_TEST_REPORT_INDEX}'"
pts_generate_report_file
fi
fi
else
console_notice "Container is not required or not started"
fi
pts_generate_gitattributes
pts_update_changelog
fi
func_print_footer