Skip to content

Commit

Permalink
(multi-stage build script)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dagefoerde committed Jan 29, 2018
1 parent 5328dfd commit 1dc9c28
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
language: php

sudo: required
dist: precise
sudo: false

cache:
directories:
Expand All @@ -23,8 +22,10 @@ php:
env:
matrix:
- DB=pgsql MOODLE_BRANCH=MOODLE_33_STABLE
- DB=pgsql MOODLE_BRANCH=MOODLE_34_STABLE
- DB=pgsql MOODLE_BRANCH=master
- DB=mysqli MOODLE_BRANCH=MOODLE_33_STABLE
- DB=mysqli MOODLE_BRANCH=MOODLE_34_STABLE
- DB=mysqli MOODLE_BRANCH=master

matrix:
Expand All @@ -36,29 +37,49 @@ matrix:
env: DB=pgsql MOODLE_BRANCH=master
- php: 5.6
env: DB=mysqli MOODLE_BRANCH=master
- php: 5.6
env: DB=pgsql MOODLE_BRANCH=MOODLE_34_STABLE
- php: 5.6
env: DB=mysqli MOODLE_BRANCH=MOODLE_34_STABLE
fast_finish: true

before_install:
- phpenv config-rm xdebug.ini
- nvm install node
- nvm install --lts
- cd ../..
- composer selfupdate
- composer create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci ^2
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"


jobs:
include:
# Prechecks against latest Moodle stable only.
- stage: static
php: 7.1
env: DB=mysqli MOODLE_BRANCH=MOODLE_34_STABLE
install:
- moodle-plugin-ci install --no-init
script:
- moodle-plugin-ci phplint
- moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd
- moodle-plugin-ci codechecker
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
- moodle-plugin-ci grunt
- moodle-plugin-ci validate

install:
- moodle-plugin-ci install

# Unit tests and behat tests against full matrix.
script:
- moodle-plugin-ci phplint
- moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd
- moodle-plugin-ci codechecker
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
- moodle-plugin-ci grunt
- moodle-plugin-ci validate
- moodle-plugin-ci phpunit --coverage-clover
- moodle-plugin-ci behat
after_success:
- bash <(curl -s https://codecov.io/bash)

stages:
- static
- test

0 comments on commit 1dc9c28

Please sign in to comment.