Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1381 from candrews/tests-in-travis
Browse files Browse the repository at this point in the history
Run tests in Travis
  • Loading branch information
borekb authored Mar 4, 2019
2 parents 3d0b91d + 4860cbb commit b14fe01
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,37 @@ sudo: false
language: php
php:
- 7.2

branches:
only:
- master
services:
- docker
addons:
apt:
packages:
- docker-ce
env:
- DOCKER_COMPOSE_VERSION=1.23.2

cache:
directories:
- $HOME/.composer/cache
- "$HOME/.npm"

before_install:
- git config --global github.accesstoken $GITHUB_OAUTH_TOKEN
- composer config -g github-oauth.github.com $GITHUB_OAUTH_TOKEN --no-interaction
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- nvm install 8
- nvm use 8

install:
- npm ci
- ( cd plugins/versionpress && composer install )

before_script:
- sudo /etc/init.d/mysql stop # Travis runs mysql by default and our docker tests want the mysql port (3306), so stop mysql

script:
cd plugins/versionpress && composer install && ./vendor/bin/phpcs --standard=ruleset.xml
- npm run lint:markdown
- npm run build-images
- npm run tests:full
- ( cd plugins/versionpress && ./vendor/bin/phpcs --standard=ruleset.xml )

0 comments on commit b14fe01

Please sign in to comment.