Skip to content
Merged
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
20 changes: 12 additions & 8 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.gitignore
**/.gitignore
**/.gitkeep
.ci/
bootstrap/cache/*
.env
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Expand All @@ -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/
19 changes: 11 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)/" $@
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .ci/runtests.sh → scripts/tests/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .ci/server-cc.php → scripts/tests/server-cc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion .ci/start-selenium.sh → scripts/tests/start-selenium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion steward.yml

This file was deleted.

Empty file modified storage/app/.gitignore
100755 → 100644
Empty file.
Empty file modified storage/debugbar/.gitignore
100755 → 100644
Empty file.
Empty file modified storage/framework/.gitignore
100755 → 100644
Empty file.
Empty file modified storage/framework/cache/.gitignore
100755 → 100644
Empty file.
Empty file modified storage/framework/sessions/.gitignore
100755 → 100644
Empty file.
Empty file modified storage/framework/views/.gitignore
100755 → 100644
Empty file.
Empty file modified storage/logs/.gitignore
100755 → 100644
Empty file.