-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
124 lines (112 loc) · 5.92 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
# This is the language of our project.
language: php
# This tells Travis CI to use its new architecture. Everything is better!
sudo: true
addons:
chrome: stable
firefox: "47.0.1"
postgresql: "9.4"
apt:
packages:
- oracle-java9-installer
- oracle-java9-set-default
- chromium-chromedriver
# This tells Travis CI to cache Composer's cache. Speeds up build times.
cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm
# Determines which versions of PHP to test our project against. Each version listed
# here will create a separate build and run the tests against that version of PHP.
# WARNING, PHP7 only works in Moodle 3.0.1 or later!
php:
- 7.1
- 7.2
# This section sets up the environment variables for the build.
env:
global:
# This line determines which version of Moodle to test against.
- MOODLE_BRANCH=master
# This matrix is used for testing against multiple databases. So for each version of
# PHP being tested, one build will be created for each database listed here. EG: for
# PHP 5.4, one build will be created using PHP 5.4 and pgsql. In addition, another
# build will be created using PHP 5.4 and mysqli.
matrix:
- DB=pgsql
- DB=mysqli
# This section defines who's going to receive the notifications!
notifications:
email:
recipients:
# I'm going to receive all reports, no matter what status they have or had (my encrypted e-mail-adress)!
- secure: "QCXE0HfLSAA3aJB+/k/S6aahPoJjz0tjpWmDx0eyanfFdt0IeYCAcjUNfY+S2slKWozwE+OLQv8ttwcQyaZdwetbd7hcH8sSf6vsZJLvYZtsz0L+M4nRUZeAsS8IGhsRY8PeKopKaZel8rnGTGO+W2nj1nFRO2E43FC9PED689fevvyDGqXG5G63CO2rVZqNMtm9HPYDJBFstAdYbxbN8pNX/VYFYcvDmbTscN8tx34UES1YvdZDvvVe04vb96JX77dh58qDZoWedYnIRGDIcZHzLJTrovi4cei79FL9gxFRzGOKKkfsypE47S8qBnulCZjOZkxnOq/A749UMclqMGWaJ6ySAL3hvX0K5/aPl2m+OZlQNprwFeUDUB5vrlhVD4NUP+/ft9SEOleVLQuJU+sxbQl1E2PtYbYf+qRWWSUQbkHydDMy4W5iZ9gSpMMD31MC+oCYR+sFqYy9cFHcXbEPuUAqCvG3RktIZOqqeyMIXPiV3yoUQrQThD8EoYujRe4T0LsHSHa5qm1Ey/Inv6McF4GQjY+GLx5R7V2fMYoqTOXdMJj9SEZ0C7pkoJ907OAec1x0ZgCk+GSgc6d0Cd/R+92YZ6gyPmMgyOI3zwJHIBKRDIp92UF3tERQx7FBQIYx3y8vgX1G7Go0fYUeluzH2IUzeuTPZRO6AlNpd0E="
on_success: always # default: change
on_failure: always # default: always
slack:
# This is the value "[Slack-Organisation]:[API-Key]#[channel]" just encrypted!
rooms:
#travisci channel
- secure: "hx94DVYG6kWVzKH27k+VsZIj5oF4SNYdOT8E/uN2bujiRvnmVpk/rO75glrI9r9qMiY++OOn2Z+d9e6WhkUzMV3iSx2d5u3CFYzjn2XlJ7AJl092QKT2OICDEmuxNq3TTlCQ95WH42jp4ghQOGuOlHD757l6rUhxK9V7xZXuAVdlDgHlUydxXonoCqdqvjcuPylMakB3tTpPAl4uUcYT5+R1UZ7PPJQcS+KT9Uf6fiybZxq6Azrn6PQ0ZkwAOyp7nCE5zHht1wvazGIki5VIgObCtCpB8mHtUsoMJh3+QFDzrycGc/o1GKy4MQUE6ZrQXOm8yRlWs6hHTH0wH5yh8RXoYwuZTO7WWwoOxNEm08iFmYzHWTMYQqVmJwc6KRTAPLXJwr+QZM3kZzcaAty32wHPaf4p61F4rEJ0Dz40vN/Veup1vMAFpEoLVPApDAxb7Pfa5HaCjqrwPQ4/L3V5fVruI3iYKjljxCXN+CO0Ma/I1dcvBhx/rSGcPtkYXL4gUkuCj4Ze4GSpZiVyDDETJl6asJQGIcjRPoqBsSH2SIoaEPugLeoffGJvzSsy4RyNTb+YfMw8AXhr5KwjO/l6gQBexohIe7j3rzBIxXook9KvutQRsfGukXYsww1/dybjgmJoSDnVinktYWoJi3wCfpJlr66PWLIHAKHfBWw7gUM="
on_success: always # default: change
on_failure: always # default: always
# This lists steps that are run before the installation step.
before_install:
# This disables XDebug which should speed up the build. One reason to remove this
# line is if you are trying to generate code coverage with PHPUnit.
- phpenv config-rm xdebug.ini
- nvm install 8.9
- nvm use 8.9
# Currently we are inside of the clone of your repository. We move up two
# directories to build the project.
- cd ../..
# Update Composer.
- composer selfupdate
# Install this project into a directory called "ci".
- composer create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci ^2
# Update the $PATH so scripts from this project can be called easily.
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"
# This lists steps that are run for installation and setup.
install:
# Run the default install. The overview of what this does:
# - Clone the Moodle project into a directory called moodle.
# - Create Moodle config.php, database, data directories, etc.
# - Copy your plugin into Moodle.
# - If your plugin has Behat features, then Behat will be setup.
# - If your plugin has unit tests, then PHPUnit will be setup.
- moodle-plugin-ci install
# This lists steps that are run for the purposes of testing. Any of
# these steps can be re-ordered or removed to your liking. And of
# course, you can add any of your own custom steps.
script:
# This step lints your PHP files to check for syntax errors.
- moodle-plugin-ci phplint
# This step runs the PHP Copy/Paste Detector on your plugin. This helps to find
# code duplication.
- moodle-plugin-ci phpcpd
# This step runs the PHP Mess Detector on your plugin. This helps to find potential
# problems with your code which can result in refactoring opportunities.
- moodle-plugin-ci phpmd
# This step runs the Moodle Code Checker to make sure that your plugin conforms to the
# Moodle coding standards. It is highly recommended that you keep this step.
- moodle-plugin-ci codechecker
# This step runs some light validation on the plugin file structure and code. Validation can be plugin specific.
- moodle-plugin-ci validate
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
- moodle-plugin-ci grunt
# This step runs the PHPUnit tests of your plugin. If your plugin has PHPUnit tests,
# then it is highly recommended that you keep this step.
# TODO: remove comments if phpunit tests are ready
#- moodle-plugin-ci phpunit --coverage-clover
# This step runs the Behat tests of your plugin. If your plugin has Behat tests, then
# it is highly recommended that you keep this step.
# TODO: remove comments when behat tests are ready
#- moodle-plugin-ci behat --profile default
#- moodle-plugin-ci behat --profile chrome
after_script:
# See: https://github.com/moodlerooms/moodle-plugin-ci/issues/32
# - ps aux
- killall -9 php
- killall -9 java
- killall -9 Xvfb
# - ps auxu