Skip to content

Commit

Permalink
ci: Fasten up CI testing
Browse files Browse the repository at this point in the history
By now TravisCI downloads all packages while testing.
This costs some time especially for resolving versions.
Therefor we now cache the composer cache dir
and be more specific about dev-packages.

* .travis.yml:
  * Caching composer package cache
  * Swap WordPress download to composer to have it in cache
* composer.json:
  * Lowering tree of possible version to make resolver faster
  * Keep WordPress in cache too now
  • Loading branch information
Pretzlaw committed Jun 24, 2019
1 parent f3c45ed commit 071047a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ cache:
before_install:
- mysql -e 'CREATE DATABASE dev;'
# Try supporting other versions
- composer require --update-with-dependencies phpunit/phpunit:$PHPUNIT_VERSION
- composer require --update-with-dependencies phpunit/phpunit:$PHPUNIT_VERSION johnpbloch/wordpress:$WP_VERSION

install:
- composer install
# Using WP-CLI instead of Composer because this way we can use the env matrix (above).
- vendor/bin/wp --allow-root core download --version=$WP_VERSION --force
- vendor/bin/wp --allow-root config create --force --dbuser=travis --dbpass="" --dbhost="127.0.0.1"
- vendor/bin/wp --allow-root config create --force --dbuser=travis --dbpass="" --dbhost="127.0.0.1" --skip-check
- vendor/bin/wp --allow-root core install --skip-email
# We get the latest patch version here to have less maintenance on the env matrix above.
- vendor/bin/wp --allow-root core update --minor
Expand Down
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}
},
"require": {
"johnpbloch/wordpress": "5.2.*",
"pimple/pimple": "^3.0",
"psr/container": "1.*"
},
Expand All @@ -25,5 +26,8 @@
},
"config": {
"sort-packages": true
},
"extra": {
"wordpress-install-dir": "srv"
}
}

0 comments on commit 071047a

Please sign in to comment.