Cleanup continuous integration environment (#913)
Move scripts in a subdirectory
This commit is contained in:
+12
-8
@@ -4,7 +4,7 @@
|
||||
.gitignore
|
||||
**/.gitignore
|
||||
**/.gitkeep
|
||||
.ci/
|
||||
bootstrap/cache/*
|
||||
.env
|
||||
CODE_OF_CONDUCT.md
|
||||
CONTRIBUTING.md
|
||||
@@ -17,19 +17,23 @@ Homestead.yaml
|
||||
node_modules/
|
||||
npm-debug.log*
|
||||
persist/
|
||||
phpunit.xml
|
||||
phpunit*
|
||||
Procfile
|
||||
public/storage/
|
||||
resources/vendor/
|
||||
results/
|
||||
.sass-lint.yml
|
||||
scripts/tests
|
||||
scripts/vagrant
|
||||
server.php
|
||||
sonar-project.properties
|
||||
steward.yml
|
||||
storage/app/public/*
|
||||
storage/debugbar/*
|
||||
storage/framework/cache/*
|
||||
storage/framework/sessions/*
|
||||
storage/framework/views/*
|
||||
storage/logs/*
|
||||
.styleci.yml
|
||||
tests/
|
||||
travis-sonar.sh
|
||||
travis-sonar.sh.sig
|
||||
.travis.yml
|
||||
.travis.yml.sig
|
||||
yarn.lock
|
||||
.travis.yml*
|
||||
vendor/
|
||||
+11
-8
@@ -32,11 +32,11 @@ matrix:
|
||||
- env: DB=postgres
|
||||
fast_finish: true
|
||||
|
||||
jdk:
|
||||
- oraclejdk8
|
||||
|
||||
git:
|
||||
depth: false
|
||||
# Run branches build on master and tagged version
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||
|
||||
addons:
|
||||
postgresql: "9.6"
|
||||
@@ -48,7 +48,7 @@ addons:
|
||||
|
||||
before_install:
|
||||
- mkdir -p $TRAVIS_BUILD_DIR/results/coverage
|
||||
- cp .env.$DB.travis .env
|
||||
- cp scripts/tests/.env.$DB.travis .env
|
||||
- if [[ "$DB" == "mysql" ]]; then mysql -v -e 'CREATE DATABASE monica;'; fi
|
||||
- if [[ "$DB" == "postgres" ]]; then psql -e -c 'CREATE DATABASE monica;' -U postgres; fi
|
||||
- composer self-update
|
||||
@@ -57,11 +57,14 @@ before_install:
|
||||
install:
|
||||
# Get packages without require-dev
|
||||
- travis_retry composer install --no-interaction --prefer-dist --no-suggest --ignore-platform-reqs --no-dev
|
||||
|
||||
# Build js and css assets
|
||||
- npm install
|
||||
- npm run production
|
||||
|
||||
# Create dist file before running composer install with dev dependencies
|
||||
- make dist
|
||||
|
||||
# Get packages with require-dev
|
||||
- travis_retry composer install --no-interaction --prefer-dist --no-suggest --ignore-platform-reqs
|
||||
|
||||
@@ -75,14 +78,14 @@ script:
|
||||
- vendor/bin/phpunit -c phpunit${DB/mysql/}.xml
|
||||
|
||||
# Start http server
|
||||
- bash -c "if [[ \"$SELENIUM\" == \"1\" ]]; then php -S localhost:8000 -t $TRAVIS_BUILD_DIR/public $TRAVIS_BUILD_DIR/.ci/server-cc.php 2>/dev/null; fi" &
|
||||
- bash -c "if [[ \"$SELENIUM\" == \"1\" ]]; then php -S localhost:8000 -t $TRAVIS_BUILD_DIR/public $TRAVIS_BUILD_DIR/scripts/tests/server-cc.php 2>/dev/null; fi" &
|
||||
- if [[ "$SELENIUM" == "1" ]]; then until $(nc -z localhost 8000); do sleep 1; echo Waiting for http server to start...; done; fi
|
||||
|
||||
# Run browser tests
|
||||
- if [[ "$SELENIUM" == "1" ]]; then php artisan dusk; fi
|
||||
|
||||
after_script:
|
||||
- if [[ "$SELENIUM" == "1" ]]; then .ci/travis-report.sh 2>/dev/null; fi
|
||||
- if [[ "$SELENIUM" == "1" ]]; then scripts/tests/travis-report.sh 2>/dev/null; fi
|
||||
- if [[ "$COVERAGE" == "1" ]]; then vendor/bin/phpcov merge --clover=$TRAVIS_BUILD_DIR/results/coverage2.xml $TRAVIS_BUILD_DIR/results/coverage/; fi
|
||||
- if [[ "$COVERAGE" == "1" ]]; then bash <(curl -s https://codecov.io/bash); fi
|
||||
- if [[ "$COVERAGE" == "1" ]]; then ./travis-sonar.sh; fi
|
||||
|
||||
@@ -103,7 +103,7 @@ dist: results/$(DESTDIR).tar.bz2 results/$(ASSETS).tar.bz2 .travis.deploy.json
|
||||
|
||||
COMMIT_MESSAGE := $(shell echo "$$TRAVIS_COMMIT_MESSAGE" | sed -s 's/"/\\\\\\\\\\"/g' | sed -s 's/(/\\(/g' | sed -s 's/)/\\)/g' | sed -s 's%/%\\/%g')
|
||||
|
||||
.travis.deploy.json: .travis.deploy.json.in
|
||||
.travis.deploy.json: scripts/tests/.travis.deploy.json.in
|
||||
cp $< $@
|
||||
sed -si "s/\$$(version)/$(BUILD)/" $@
|
||||
sed -si "s/\$$(description)/$(COMMIT_MESSAGE)/" $@
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -evuo pipefail
|
||||
|
||||
SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && /bin/pwd -P)
|
||||
ROOT=$(realpath $SELF_PATH/..)
|
||||
ROOT=$(realpath $SELF_PATH/../..)
|
||||
HOST=localhost
|
||||
|
||||
$SELF_PATH/start-selenium.sh
|
||||
@@ -7,7 +7,7 @@
|
||||
/** Coverage files destination. */
|
||||
const STORAGE = '/results/coverage';
|
||||
|
||||
$root = realpath(__DIR__.'/../');
|
||||
$root = realpath(__DIR__.'/../../');
|
||||
|
||||
$uri = urldecode(
|
||||
parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)
|
||||
@@ -16,7 +16,7 @@ realpath ()
|
||||
set -evuo pipefail
|
||||
|
||||
SELF_PATH=$(cd -P -- "$(dirname -- "$0")" && /bin/pwd -P)
|
||||
ROOT=$(realpath $SELF_PATH/..)
|
||||
ROOT=$(realpath $SELF_PATH/../..)
|
||||
|
||||
if [ -z "${DISPLAY:-}" ]; then
|
||||
echo Start Xvfb;
|
||||
@@ -1 +0,0 @@
|
||||
tests_dir: ./tests/BrowserSelenium
|
||||
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Executable → Regular
Reference in New Issue
Block a user