Merge pull request #1029 from creative-commoners/pulls/5.8/travis-shared

MNT Travis shared config
This commit is contained in:
Garion Herman 2020-12-21 11:18:56 +13:00 committed by GitHub
commit 7ae70598f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 52 additions and 47 deletions

View File

@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -38,7 +38,7 @@
"silverstripe/mimevalidator": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"sminnee/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.0"
},
"autoload": {

View File

@ -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",

View File

@ -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 -->

View File

@ -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',