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

Run tests in Travis #1381

Merged
merged 3 commits into from
Mar 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 )