Skip to content

Commit bda05a2

Browse files
committed
fix travis. intr run-fun-tests script.
1 parent 12d0560 commit bda05a2

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

.travis.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ git:
66
language: php
77

88
env:
9+
SYMFONY_VERSION=2.8.* PHPSTAN=false UNIT_TESTS=false PREPARE_CONTAINER=false FUNCTIONAL_TESTS=false RDKAFKA_TESTS=false
910

1011
matrix:
1112
include:
@@ -23,20 +24,20 @@ matrix:
2324
env: SYMFONY_VERSION=3.0.* UNIT_TESTS=true
2425
- php: 7.1
2526
services: docker
26-
env: SYMFONY_VERSION=2.8.* FUNCTIONAL_TESTS=true
27+
env: SYMFONY_VERSION=2.8.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
2728
- php: 7.1
2829
services: docker
29-
env: SYMFONY_VERSION=3.0.* FUNCTIONAL_TESTS=true
30+
env: SYMFONY_VERSION=3.0.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
3031
- php: 7.1
3132
services: docker
32-
env: SYMFONY_VERSION=3.2.* FUNCTIONAL_TESTS=true
33+
env: SYMFONY_VERSION=3.2.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
3334
- php: 7.1
3435
services: docker
35-
env: SYMFONY_VERSION=3.3.* FUNCTIONAL_TESTS=true
36+
env: SYMFONY_VERSION=3.3.* FUNCTIONAL_TESTS=true PREPARE_CONTAINER=true
3637
allow_failures:
3738
- php: 7.1
3839
services: docker
39-
env: SYMFONY_VERSION=3.3.* RDKAFKA_TESTS=true
40+
env: SYMFONY_VERSION=3.3.* RDKAFKA_TESTS=true PREPARE_CONTAINER=true
4041

4142
cache:
4243
directories:
@@ -47,20 +48,17 @@ install:
4748
- echo "memory_limit=2048M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
4849
- composer require symfony/symfony:${SYMFONY_VERSION} --no-update
4950
- composer install
50-
- if [ "$FUNCTIONAL_TESTS" = true ]; then docker --version; fi
51-
- if [ "$FUNCTIONAL_TESTS" = true ]; then docker-compose --version; fi
52-
- if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -b; fi
53-
- if [ "$RDKAFKA_TESTS" = true ]; then docker --version; fi
54-
- if [ "$RDKAFKA_TESTS" = true ]; then docker-compose --version; fi
55-
- if [ "$RDKAFKA_TESTS" = true ]; then bin/dev -b; fi
51+
- if [ "$PREPARE_CONTAINER" = true ]; then docker --version; fi
52+
- if [ "$PREPARE_CONTAINER" = true ]; then docker-compose --version; fi
53+
- if [ "$PREPARE_CONTAINER" = true ]; then bin/dev -b; fi
5654

5755
script:
5856
- if [ "$PHPSTAN" = true ]; then composer require "phpstan/phpstan:^0.8" ; php -d memory_limit=512M bin/phpstan analyse -l 1 -c phpstan.neon pkg/gps pkg/amqp-ext pkg/async-event-dispatcher pkg/dbal pkg/enqueue pkg/enqueue-bundle pkg/fs pkg/gearman pkg/job-queue pkg/null pkg/pheanstalk pkg/redis pkg/simple-client pkg/sqs pkg/stomp pkg/test pkg/rdkafka; fi
5957
- if [ "$PHP_CS_FIXER" = true ]; then IFS=$'\n'; COMMIT_SCA_FILES=($(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")); unset IFS; fi
6058
- if [ "$PHP_CS_FIXER" = true ]; then ./bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no --path-mode=intersection -- "${COMMIT_SCA_FILES[@]}"; fi
6159
- if [ "$UNIT_TESTS" = true ]; then bin/phpunit --exclude-group=functional; fi
62-
- if [ "$FUNCTIONAL_TESTS" = true ]; then bin/dev -t "--exclude-group=rdkafka"; fi
63-
- if [ "RDKAFKA_TESTS" = true ]; then bin/dev -t "--group=rdkafka"; fi
60+
- if [ "$FUNCTIONAL_TESTS" = true ]; then bin/run-fun-test.sh --exclude-group=rdkafka; fi
61+
- if [ "RDKAFKA_TESTS" = true ]; then bin/run-fun-test.sh --group=rdkafka; fi
6462

6563
notifications:
6664
webhooks:

bin/dev

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ while getopts "bustefcd" OPTION; do
2121
./bin/php-cs-fixer fix
2222
;;
2323
t)
24-
COMPOSE_PROJECT_NAME=mqdev docker-compose run --workdir="/mqdev" --rm dev ./bin/test "$2" "$3" "$4"
24+
./bin/run-fun-test.sh "$2"
2525
;;
2626
c)
2727
COMPOSE_PROJECT_NAME=mqdev docker-compose run -e CHANGELOG_GITHUB_TOKEN=${CHANGELOG_GITHUB_TOKEN:-""} --workdir="/mqdev" --rm generate-changelog github_changelog_generator --future-release "$2" --simple-list

bin/run-fun-test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
set -x
4+
set -e
5+
6+
COMPOSE_PROJECT_NAME=mqdev docker-compose run --workdir="/mqdev" --rm dev ./bin/test "$@"

0 commit comments

Comments
 (0)