Skip to content
Draft
Show file tree
Hide file tree
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
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/vendor/
composer.lock
/composer.lock

# Stuff from tests
tests/htdocs
tests/move/htdocs
tests/copy/htdocs
tests/move/vendor
tests/copy/vendor
tests/move/composer.lock
tests/copy/composer.lock
/tests/htdocs/
/tests/move/htdocs/
/tests/move/vendor/
/tests/move/composer.lock
/tests/copy/htdocs/
/tests/copy/vendor/
/tests/copy/composer.lock
29 changes: 10 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This uses newer and faster docker based build system
sudo: false

language: php

php:
Expand All @@ -12,29 +9,23 @@ php:
- '5.6'
- nightly

matrix:
jobs:
allow_failures:
- php: nightly

before_script:
# We use the same repo straight from github because it required lesser amount of hacks
# Here we force the same current git commit id for composer
- sed -i -e "s|%%TRAVIS_COMMIT%%|$TRAVIS_COMMIT|g" tests/move/composer.json
- sed -i -e "s|%%TRAVIS_COMMIT%%|$TRAVIS_COMMIT|g" tests/copy/composer.json

# Install test run into tests/ folder using tests/composer.json
- composer install --working-dir=./tests/move/
- composer install --working-dir=./tests/copy/

script:
# Sanity php syntax check
- php -d error_reporting=32767 -l src/Dropin.php
before_install:
- git fetch --unshallow

# Sanity composer check
- composer validate --strict

install:
# Install phpunit etc
- composer install --prefer-dist
- composer update --prefer-dist

script:
# Sanity php syntax check
- php -l src/Dropin.php

# Run the real tests finally
- composer test
- composer run-script -v test
16 changes: 12 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
],
"minimum-stability": "dev",
"require": {
"php": ">=5.3.2",
"composer-plugin-api": "^1.0 | ^2.0"
"php": "^5.3.2 || ^7.0.0",
"composer-plugin-api": "^1.0 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7"
Expand All @@ -27,9 +27,17 @@
"class": "Koodimonni\\Composer\\Dropin"
},
"scripts": {
"test:move": [
"@composer update --working-dir=./tests/move/ -vvv",
"phpunit --verbose ./tests/move/*.php"
],
"test:copy": [
"@composer update --working-dir=./tests/copy/ -vvv",
"phpunit --verbose ./tests/copy/*.php"
],
"test": [
"composer install --working-dir=./tests/move/ && vendor/bin/phpunit ./tests/move/*.php",
"composer install --working-dir=./tests/copy/ && vendor/bin/phpunit ./tests/copy/*.php"
"@test:move",
"@test:copy"
]
}
}
7 changes: 3 additions & 4 deletions tests/copy/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"name": "koodimonni/composer-dropin-installer-tests",
"description": "composer.json for testing composer-dropin-installer",
"license": "WTFPL",
"type": "project",
Expand All @@ -11,8 +10,8 @@
],
"repositories": [
{
"type": "vcs",
"url": "https://github.com/Koodimonni/Composer-Dropin-Installer"
"type": "git",
"url": "../../.git"
},
{
"type": "path",
Expand All @@ -23,7 +22,7 @@
}
],
"require": {
"koodimonni/composer-dropin-installer": "dev-master#%%TRAVIS_COMMIT%%",
"koodimonni/composer-dropin-installer": "*",
"dropininternal/dropin-test-package": "dev-master"
},
"extra": {
Expand Down
10 changes: 5 additions & 5 deletions tests/move/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"name": "koodimonni/composer-dropin-installer-tests",
"description": "composer.json for testing composer-dropin-installer",
"license": "WTFPL",
"type": "project",
Expand All @@ -11,8 +10,8 @@
],
"repositories": [
{
"type": "vcs",
"url": "https://github.com/Koodimonni/Composer-Dropin-Installer"
"type": "git",
"url": "../../.git"
},
{
"type": "composer",
Expand All @@ -23,7 +22,7 @@
}
],
"require": {
"koodimonni/composer-dropin-installer": "dev-master#%%TRAVIS_COMMIT%%",
"koodimonni/composer-dropin-installer": "*",
"koodimonni-language/fi": "*"
},
"extra": {
Expand All @@ -32,5 +31,6 @@
"htdocs/wp-content/languages/plugins": ["vendor:koodimonni-plugin-language"],
"htdocs/wp-content/languages/themes": ["vendor:koodimonni-theme-language"]
}
}
},
"minimum-stability": "dev"
}