forked from open-lms-open-source/moodle-plugin-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (82 loc) · 2.89 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
language: php
addons:
postgresql: "9.5"
services:
- mysql
- postgresql
- docker
cache:
directories:
- $HOME/.composer/cache
- $HOME/.npm
php:
- 7.3
env:
global:
- IGNORE_PATHS=ignore
- IGNORE_NAMES=ignore_name.php
- MUSTACHE_IGNORE_NAMES=broken.mustache
- DB=pgsql
- MOODLE_BRANCH=master
- PROFILE=chrome
install:
- phpenv config-rm xdebug.ini
- nvm install 8.9
- nvm use 8.9
- make init
# Start Selenium Standalone with Chrome/Firefox installed.
- docker run -d -p 127.0.0.1:4444:4444 --net=host -v /dev/shm:/dev/shm selenium/standalone-${PROFILE}:3
# Mimic how a Moodle plugin would be run.
- cp -R tests/Fixture/moodle-local_travis ../moodle-local_travis
- export PATH="$(cd bin; pwd):$(cd vendor/bin; pwd):$PATH"
- export TRAVIS_BUILD_DIR=$(cd ../moodle-local_travis; pwd)
# Finally, the standard install step.
- moodle-plugin-ci install
script:
- make test-phpunit
# This is basically "integration" testing.
- moodle-plugin-ci phplint
- moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd
- moodle-plugin-ci codechecker
- moodle-plugin-ci validate
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
- moodle-plugin-ci grunt || [ "$MOODLE_BRANCH" != 'master' -a "$MOODLE_BRANCH" != 'MOODLE_38_STABLE' ]
- moodle-plugin-ci phpdoc
- moodle-plugin-ci phpunit --coverage-text
- moodle-plugin-ci behat --profile $PROFILE
jobs:
include:
- stage: Tests
addons: skip
install:
- phpenv config-rm xdebug.ini
- make init
script:
- make validate
- stage: Integration tests
- php: 7.3
env: MOODLE_BRANCH=MOODLE_38_STABLE
- php: 7.3
env: MOODLE_BRANCH=MOODLE_37_STABLE
- php: 7.2
env: MOODLE_BRANCH=MOODLE_36_STABLE
- php: 7.2
env: MOODLE_BRANCH=MOODLE_35_STABLE
- stage: Deploy
addons: skip
install: skip
script: skip
before_deploy:
- make build/moodle-plugin-ci.phar
- php build/moodle-plugin-ci.phar list
deploy:
provider: releases
api_key:
secure: 1A6XanGYBX2fjDfQF96LK8otHz9Sh9g29eq7O+4ntAFyN5hYTVxJBdtp6LFkoeEHeQJtHpl/vmw+htavL5UXcYHqLsX+suXH8JML0Bg5sTA/HIhksetl226PtbdJabD/5AerLzqf+PiHGagzBBqscUqkVl7DdHEVkC/OQCDNcB5onFNqSRlCP50WFyXHBr4TccrUuvHK+jKcG4AFMLU7f2Bo2j5NBQW+ucY/RdNczXrRo4et9JHZJRocPFxQMpOnV7fTrQaHlt+HQe5FikNM28Vh44uVj7ZGYLWZNmtQb9K3Fq9t+atObMcYjsjBbnqypzm8BUNDx2YfsZvcpNOEtksYx6rE58EXQgJCBod7azjt4ulIrKPNOK64A9s6SX/ZQ68VEGYCYlC412kWC6SwPp77iDRLv4Z0MpmvtZfJ1LbkvMx22SRJGBSD24INvLxh4XnfUN0qQ021HUNIbTQ8cBuTGzMWf7W2nYjEGbTVV1fTMcFFy8IXOhnodM1s5kbMDRjASxkNpMBbbhfh4b3WnBhoi+Ecqjq4DFhU7YLHdjLF1pkuRHoBn1I7vNbO+JaEMtTQHokDxBGe4hIehkGxs04Q//2tI7DsWyVLhCTStoC9OqQMTZmAJCUUVV/L9HV7HS6ZqgkBlPBvpld3g8cMqRVN19p4B09WyMQcK8usJEw=
file: build/moodle-plugin-ci.phar
skip_cleanup: true
on:
repo: blackboard-open-source/moodle-plugin-ci
tags: true