-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
167 lines (145 loc) · 5.86 KB
/
.travis.yml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#TODO:
# passwordless apt-get install
# Split with Buildhive? (Requires adding delay to avoid infinite commit-build-commit loop)
# Possible to test caching, minification, etc?
# PHP Documentation Generator
# JS Documentation Generator (YUI Docs)
# Test and Uncomment ERD Generation / Database Tools
# Add and Test Security Tools (OWASP-ZAP with Selenium)
# Include Codeception to consolidate testing?
# Unit Testing for Javascript?
# QA Tools for Javascript?
# DOT and GraphViz
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints
language: php
# list any PHP version you want to test against
php:
# using major version aliases
## aliased to 5.2.17
# - 5.2
# aliased to a recent 5.3.x version
- 5.3
# aliased to a recent 5.4.x version
# - 5.4
## aliased to a recent 5.5.x version
# - 5.5
# optionally specify a list of environments, for example to test different RDBMS
env:
matrix:
DB=mysql
# - DB=pgsql
global:
- secure: "PJPBRPKwEDGx1wJxj0odM4Q4acpKUaTLctAPfjGvCi5VX+yIlEfgL16bq+D7HGTTmQHMkvJcoF1fTjBY1GwV8Gu3XwmSQ1qPJQRbGiPfFtDh3Sj7svknQGSfk0lF82uNkPRhYCvUJPuz+/Im3M9QZKhzKYuLL6MfIJjpOaCr1dw="
- secure: "XX2hKgDsr10lr7sbsxzBC9WQyTjnuxntNxsjeiT4NXVbTSMPblsjQww5BDNRe4RoNoeJzCv4eYV6CuCBVzS/pMcfVVx1xJ5361vzUOHPfSpUCMzdsjqy2ANf9t2NNBSXNn4P4NbvxxABkOD+RC7Hq4seUvrkSwTOt/0oWnZ4ul4="
#============================================================================================
before_script:
# execute any number of scripts before the test run, custom env's are available as variables
#-----------------------------------------------------
#SAUCELABS
- sudo apt-get -qq install nodejs
- npm install -g se-interpreter
# - ./DEV/tests/setup/before_script.sh
- ./DEV/tests/setup/apache.sh
- ./DEV/tests/setup/selenium.sh
# - ./DEV/tests/setup/saucelabs_setup.sh
# - ./DEV/tests/setup/saucelabs_test.sh
##SauceConnect
## (?) Already be covered in saucelabs_setup.sh
# - curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash
## Install / Update
- sudo apt-get update -qq
## For SQL ERD Generation
- sudo apt-get install -qq sqlfairy
## For PHP_UML
# - sudo apt-get install -qq php5-xsl
# - pear install PHP_UML
## w3af
# - sudo apt-get install -qq w3af-console
## For YUI Docs
# - sudo apt-get install -qq nodejs
# - npm -g install yuidocjs
## For JSCodeSniffer (Assumes node.js already installed)
## https://github.com/dsheiko/jscodesniffer
# - npm -g install --save jscodesniffer
# - npm i
# - chmod +x jscs
# - ln -s jscs /usr/local/bin/jscs
# - jscs /path/to/source/code --standard=Jquery
## Only if SQLFairy doesn't work (Backup Plan: SchemaSpy)
# - sudo apt-get install -qq graphviz
#--------------------------------------------------
#---------------------------------------------------
## DB Setup
# - if [[ "$DB" == "pgsql" ]]; then psql -c "DROP DATABASE IF EXISTS hello_world_test;" -U postgres; fi
# - if [[ "$DB" == "pgsql" ]]; then psql -c "create database hello_world_test;" -U postgres; fi
- if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS tickets;" -uroot; fi
# HEY IDIOT: username is travis, password is blank
#---------------------------------------------------
# - pear channel-discover pear.phpdoc.org
# - pear install phpdoc/phpDocumentor
- phpenv rehash
#---------------------------------------------------
##DEV TOOLS
#PHP_UML (Works local)(<1min)(Requires PHP Extension "XSL")
# - phpuml ./ -n TicketsCAD -o ./DEV/build/PHP_UML -f htmlnew
# - phpuml ./ -n TicketsCAD -o ./DEV/build/PHP_UML -f xmi
#PHPCallGraph (Failed Local)(0) (Use Higher-Order-PHP Call Graph instead. Also convert dot to graphML.)
# - php ./DEV/tools/phpcallgraph-0.8.0/bin/phpcallgraph -f png -o ./DEV/build/PHP-CallGraph/callgraph.png -r -p ./
# - php ./DEV/tools/phpcallgraph-0.8.0/bin/phpcallgraph -r -f deadcode ./ > ./DEV/build/PHP-CallGraph/phpcallgraph-deadcode.txt
#----------------------------------------------
# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
#==================================================================================
script:
##TESTING
## UI TESTING
#Selenium and Appium(SauceLabs) (Sauce Connect?)
- se-interpreter ./DEV/tests/setup/interpreter_config.json
## SECURITY TESTING
#W3AF
#Skipfish
#OWASP-ZAP
# /path/to/ZapDir/zap.jar -daemon (Starts zap with no UI)
#RIPS
#Vega
## BEHAVIOR TESTING
#Behat
## UNIT TESTING
#PHPUnit
# - phpunit --verbose -c tests/phpunit.xml
# - phpunit --configuration phpunit_$DB.xml --coverage-text
- phpunit --version
after_script:
#-----------------------------------------
## Database Tools
#SQLFairy ERD Generation
#(http://nsaunders.wordpress.com/2009/01/11/easy-visualisation-of-database-schemas-using-sqlfairy/)
- mysqldump -u travis -p -d tickets > ./DEV/build/DB/tickets.sql
- sqlt-graph -f MySQL -o ./DEV/build/DB/tickets.png -t png ./DEV/build/DB/tickets.sql
#Backup Plan: SchemaSpy (Java Command Line for Generating Database ERDs)
## requires Java be installed
# - java -jar ./DEV/tools/schemaSpy.jar -t mysql -db tickets -u user [-p password] -o ./DEV/build/SchemaSpy/
# - or -
#SchemaCrawler
#------------------------------------------
## Documentation Tools
#PHPCodeBrowser (Works local)(<1min)
# - phpcb -s ./ -o ./DEV/build/PHPQATools/PHP-CB/ -i ./DEV/
##Documentation Generator
#PHPDocumentor ()() (Mod to avoid documenting the documentation?)
# - phpdoc -d . -t ./DEV/build/docs --template checkstyle -i ./DEV/*
# - or -
#Doxygen (Doxyfile stored in ./DEV/build/docs/Doxygen/)
# Need to install Doxygen
# Doxygen Usage:
#PHPDox (Create XML Config File, store in ./DEV/tools/Doc-Config)
# - phpdox
# - and a -
#JS Doc Generator ...
#YUI Docs? (Requires node.js)
# - yuidoc -e .js,.php -x ./DEV/*,.git ./
#------------------------------------------
notifications:
# configure notifications (email, IRC, campfire etc)
# - irc: "irc.freenode.org#travis"
email: false