MNT Travis shared config, use sminnee/phpunit
81
.travis.yml
@ -1,47 +1,42 @@
|
||||
language: php
|
||||
version: ~> 1.0
|
||||
|
||||
dist: xenial
|
||||
# Use a manual matrix as composer.json requires "silverstripe/cms": "^4.6",
|
||||
# This should be changed to "standard-jobs-range-npm" as soon as the lowest recipe
|
||||
# version in the travis shared jobs matrix is 4.6
|
||||
import:
|
||||
- silverstripe/silverstripe-travis-shared:config/provision/standard.yml
|
||||
|
||||
services:
|
||||
- mysql
|
||||
- postgresql
|
||||
|
||||
env:
|
||||
global:
|
||||
- COMPOSER_ROOT_VERSION=5.x-dev
|
||||
- TRAVIS_NODE_VERSION="10"
|
||||
|
||||
matrix:
|
||||
jobs:
|
||||
include:
|
||||
- php: 7.1
|
||||
env: DB=MYSQL RECIPE_VERSION=4.6.x-dev PHPUNIT_TEST=1 PHPCS_TEST=1
|
||||
- php: 7.2
|
||||
env: DB=MYSQL RECIPE_VERSION=4.6.x-dev PHPUNIT_TEST=1 NPM_TEST=1
|
||||
- php: 7.3
|
||||
env: DB=PGSQL RECIPE_VERSION=4.6.x-dev PHPUNIT_TEST=1 PHPUNIT_COVERAGE_TEST=1
|
||||
- php: 7.4
|
||||
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1
|
||||
|
||||
before_script:
|
||||
# Init PHP
|
||||
- phpenv rehash
|
||||
- phpenv config-rm xdebug.ini
|
||||
- echo 'memory_limit=-1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
||||
|
||||
# Install composer dependencies
|
||||
- composer validate
|
||||
- composer require --no-update silverstripe/recipe-cms:$RECIPE_VERSION
|
||||
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:^2 --prefer-dist; fi
|
||||
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
||||
- if [[ $NPM_TEST ]]; then nvm install $TRAVIS_NODE_VERSION && nvm use $TRAVIS_NODE_VERSION && npm install -g yarn && yarn install --network-concurrency 1 && yarn run build; fi
|
||||
|
||||
script:
|
||||
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
|
||||
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml -vvv; fi
|
||||
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi
|
||||
- if [[ $NPM_TEST ]]; then git diff-files --quiet -w --relative=client; fi
|
||||
- if [[ $NPM_TEST ]]; then git diff -w --no-color --relative=client; fi
|
||||
- if [[ $NPM_TEST ]]; then yarn run lint; fi
|
||||
|
||||
after_success:
|
||||
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
|
||||
env:
|
||||
- DB=MYSQL
|
||||
- REQUIRE_INSTALLER="4.6.x-dev"
|
||||
- NPM_TEST=1
|
||||
- php: 7.1
|
||||
env:
|
||||
- DB=MYSQL
|
||||
- REQUIRE_INSTALLER="4.6.x-dev"
|
||||
- PHPUNIT_TEST=1
|
||||
- php: 7.2
|
||||
env:
|
||||
- DB=PGSQL
|
||||
- REQUIRE_INSTALLER="4.6.x-dev"
|
||||
- PHPUNIT_TEST=1
|
||||
- php: 7.3
|
||||
env:
|
||||
- DB=MYSQL
|
||||
- REQUIRE_INSTALLER="4.7.x-dev"
|
||||
- PHPUNIT_TEST=1
|
||||
- PHPCS_TEST=1
|
||||
- php: 7.4
|
||||
env:
|
||||
- DB=MYSQL
|
||||
- REQUIRE_INSTALLER="4.x-dev"
|
||||
- PHPUNIT_COVERAGE_TEST=1
|
||||
- php: nightly
|
||||
env:
|
||||
- DB=MYSQL
|
||||
- REQUIRE_INSTALLER="4.x-dev"
|
||||
- PHPUNIT_TEST=1
|
||||
- COMPOSER_INSTALL_ARG=--ignore-platform-reqs
|
||||
|
BIN
client/src/images/editablecheckbox.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
client/src/images/editablecheckboxgroupfield.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
client/src/images/editabledatefield.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
client/src/images/editabledropdown.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
client/src/images/editableemailfield.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
client/src/images/editablefilefield.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
client/src/images/editableformheading.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
client/src/images/editableliteralfield.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
client/src/images/editablememberlistfield.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
client/src/images/editablenumericfield.png
Normal file
After Width: | Height: | Size: 525 B |
BIN
client/src/images/editablepasswordfield.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
client/src/images/editableradiofield.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
client/src/images/editabletextfield.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
client/src/images/sitetree_icon.png
Normal file
After Width: | Height: | Size: 15 KiB |
@ -38,7 +38,7 @@
|
||||
"silverstripe/mimevalidator": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7",
|
||||
"sminnee/phpunit": "^5.7",
|
||||
"squizlabs/php_codesniffer": "^3.0"
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -13,7 +13,8 @@
|
||||
"lint": "yarn lint-js && yarn lint-sass",
|
||||
"lint-js": "eslint client/src",
|
||||
"lint-js-fix": "eslint client/src --fix",
|
||||
"lint-sass": "sass-lint client/src"
|
||||
"lint-sass": "sass-lint client/src",
|
||||
"test": "true"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -31,7 +32,8 @@
|
||||
"homepage": "https://github.com/silverstripe/silverstripe-userforms#readme",
|
||||
"devDependencies": {
|
||||
"@silverstripe/eslint-config": "^0.0.5",
|
||||
"@silverstripe/webpack-config": "^1.3.0"
|
||||
"@silverstripe/webpack-config": "^1.3.0",
|
||||
"copy-webpack-plugin": "^4"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-preset-es2016": "^6.24.1",
|
||||
|
@ -2,6 +2,9 @@
|
||||
<ruleset name="SilverStripe">
|
||||
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description>
|
||||
|
||||
<file>code</file>
|
||||
<file>tests</file>
|
||||
|
||||
<!-- base rules are PSR-2 -->
|
||||
<rule ref="PSR2" >
|
||||
<!-- Current exclusions -->
|
||||
|
@ -1,6 +1,7 @@
|
||||
const Path = require('path');
|
||||
// Import the core config
|
||||
const webpackConfig = require('@silverstripe/webpack-config');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const {
|
||||
resolveJS,
|
||||
externalJS,
|
||||
@ -49,7 +50,11 @@ const config = [
|
||||
resolve: resolveJS(ENV, PATHS),
|
||||
externals: externalJS(ENV, PATHS),
|
||||
module: moduleJS(ENV, PATHS),
|
||||
plugins: pluginJS(ENV, PATHS),
|
||||
plugins: pluginJS(ENV, PATHS).concat([
|
||||
new CopyWebpackPlugin([
|
||||
{ from: 'client/src/images', to: 'images' },
|
||||
])
|
||||
])
|
||||
},
|
||||
{
|
||||
name: 'css',
|
||||
|