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: jobs:
- mysql
- postgresql
env:
global:
- COMPOSER_ROOT_VERSION=5.x-dev
- TRAVIS_NODE_VERSION="10"
matrix:
include: 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 - php: 7.4
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1 env:
- DB=MYSQL
before_script: - REQUIRE_INSTALLER="4.6.x-dev"
# Init PHP - NPM_TEST=1
- phpenv rehash - php: 7.1
- phpenv config-rm xdebug.ini env:
- echo 'memory_limit=-1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - DB=MYSQL
- REQUIRE_INSTALLER="4.6.x-dev"
# Install composer dependencies - PHPUNIT_TEST=1
- composer validate - php: 7.2
- composer require --no-update silverstripe/recipe-cms:$RECIPE_VERSION env:
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:^2 --prefer-dist; fi - DB=PGSQL
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile - REQUIRE_INSTALLER="4.6.x-dev"
- 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 - PHPUNIT_TEST=1
- php: 7.3
script: env:
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi - DB=MYSQL
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml -vvv; fi - REQUIRE_INSTALLER="4.7.x-dev"
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi - PHPUNIT_TEST=1
- if [[ $NPM_TEST ]]; then git diff-files --quiet -w --relative=client; fi - PHPCS_TEST=1
- if [[ $NPM_TEST ]]; then git diff -w --no-color --relative=client; fi - php: 7.4
- if [[ $NPM_TEST ]]; then yarn run lint; fi env:
- DB=MYSQL
after_success: - REQUIRE_INSTALLER="4.x-dev"
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi - 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" "silverstripe/mimevalidator": "^2.0"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^5.7", "sminnee/phpunit": "^5.7",
"squizlabs/php_codesniffer": "^3.0" "squizlabs/php_codesniffer": "^3.0"
}, },
"autoload": { "autoload": {

View File

@ -13,7 +13,8 @@
"lint": "yarn lint-js && yarn lint-sass", "lint": "yarn lint-js && yarn lint-sass",
"lint-js": "eslint client/src", "lint-js": "eslint client/src",
"lint-js-fix": "eslint client/src --fix", "lint-js-fix": "eslint client/src --fix",
"lint-sass": "sass-lint client/src" "lint-sass": "sass-lint client/src",
"test": "true"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -31,7 +32,8 @@
"homepage": "https://github.com/silverstripe/silverstripe-userforms#readme", "homepage": "https://github.com/silverstripe/silverstripe-userforms#readme",
"devDependencies": { "devDependencies": {
"@silverstripe/eslint-config": "^0.0.5", "@silverstripe/eslint-config": "^0.0.5",
"@silverstripe/webpack-config": "^1.3.0" "@silverstripe/webpack-config": "^1.3.0",
"copy-webpack-plugin": "^4"
}, },
"dependencies": { "dependencies": {
"babel-preset-es2016": "^6.24.1", "babel-preset-es2016": "^6.24.1",

View File

@ -2,6 +2,9 @@
<ruleset name="SilverStripe"> <ruleset name="SilverStripe">
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description> <description>CodeSniffer ruleset for SilverStripe coding conventions.</description>
<file>code</file>
<file>tests</file>
<!-- base rules are PSR-2 --> <!-- base rules are PSR-2 -->
<rule ref="PSR2" > <rule ref="PSR2" >
<!-- Current exclusions --> <!-- Current exclusions -->

View File

@ -1,6 +1,7 @@
const Path = require('path'); const Path = require('path');
// Import the core config // Import the core config
const webpackConfig = require('@silverstripe/webpack-config'); const webpackConfig = require('@silverstripe/webpack-config');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const { const {
resolveJS, resolveJS,
externalJS, externalJS,
@ -49,7 +50,11 @@ const config = [
resolve: resolveJS(ENV, PATHS), resolve: resolveJS(ENV, PATHS),
externals: externalJS(ENV, PATHS), externals: externalJS(ENV, PATHS),
module: moduleJS(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', name: 'css',