From adab902a1b0f12d5f262ea646e028f5cc48db8d5 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 27 Feb 2019 10:18:20 -0500 Subject: [PATCH 1/3] Remove GH access token The GH access token can be leaked by malicious PRs Undoes aa69729a --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d5e48e3db..7da62a85f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,6 @@ cache: - $HOME/.composer/cache before_install: - - git config --global github.accesstoken $GITHUB_OAUTH_TOKEN - - composer config -g github-oauth.github.com $GITHUB_OAUTH_TOKEN --no-interaction script: cd plugins/versionpress && composer install && ./vendor/bin/phpcs --standard=ruleset.xml From 97a07656a51f4567c3fda6595c59d0e391201b74 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 27 Feb 2019 10:15:08 -0500 Subject: [PATCH 2/3] Run Travis for all, not just master + PRs Undoes 64922d6 --- .travis.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7da62a85f..f77d41587 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,6 @@ language: php php: - 7.2 -branches: - only: - - master - cache: directories: - $HOME/.composer/cache From 4860cbb780e7b56e0c3be778bc87d180c2f02006 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Wed, 27 Feb 2019 10:16:20 -0500 Subject: [PATCH 3/3] Have Travis run tests --- .travis.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f77d41587..1c587fe17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,37 @@ sudo: false language: php php: - 7.2 +services: + - docker +addons: + apt: + packages: + - docker-ce +env: + - DOCKER_COMPOSE_VERSION=1.23.2 cache: directories: - $HOME/.composer/cache + - "$HOME/.npm" before_install: + - 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 )