Skip to content

Commit c3a6f7f

Browse files
author
Harry Bragg
authored
extend processing time for messages (#48)
* extend processing time for messages * remove prefer stable from prefer lowest * try different hamcrest version for travis composer
1 parent 2c948a8 commit c3a6f7f

37 files changed

+2849
-89
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
vendor/
2-
composer.lock
2+
3+
.idea
4+
.DS_Store

.travis.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ cache:
77
- $HOME/.composer/cache/files
88

99
php:
10-
- 5.5
1110
- 5.6
1211
- 7.0
1312
- 7.1
1413
- 7.2
1514
- nightly
16-
- hhvm
1715

1816
env:
1917
- 'COMPOSER_FLAGS="--prefer-lowest --prefer-stable"'
@@ -22,10 +20,10 @@ env:
2220
matrix:
2321
allow_failures:
2422
- php: nightly
25-
- php: 7.2
2623

27-
install:
28-
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
24+
before_script:
25+
- composer config platform.php $(php -r "echo PHP_VERSION;")
26+
- travis_retry composer update --no-interaction --prefer-dist $COMPOSER_FLAGS
2927

3028
script:
3129
- vendor/bin/phpcs -p --warning-severity=0 src/ tests/

Makefile

+29-17
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,39 @@
11
SHELL = /bin/sh
22

33
DOCKER ?= $(shell which docker)
4-
DOCKER_REPOSITORY := graze/php-alpine:7.1-test
5-
VOLUME := /opt/graze/queue
6-
VOLUME_MAP := -v $$(pwd):${VOLUME}
7-
DOCKER_RUN_BASE := ${DOCKER} run --rm -t ${VOLUME_MAP} -w ${VOLUME}
8-
DOCKER_RUN := ${DOCKER_RUN_BASE} ${DOCKER_REPOSITORY}
4+
PHP_VER := 7.2
5+
IMAGE := graze/php-alpine:${PHP_VER}-test
6+
VOLUME := /srv
7+
DOCKER_RUN_BASE := ${DOCKER} run --rm -t -v $$(pwd):${VOLUME} -w ${VOLUME}
8+
DOCKER_RUN := ${DOCKER_RUN_BASE} ${IMAGE}
99

10-
.PHONY: install composer clean help run
11-
.PHONY: test lint lint-fix test-unit test-integration test-matrix test-coverage test-coverage-html test-coverage-clover
10+
PREFER_LOWEST ?=
11+
12+
.PHONY: install composer help
13+
.PHONY: test lint lint-fix test-unit test-integration test-matrix test-matrix-lowest
14+
.PHONY: test-coverage test-coverage-html test-coverage-clover
1215

1316
.SILENT: help
1417

1518
# Building
1619

17-
build: ## Download the dependencies
18-
make 'composer-install --optimize-autoloader'
20+
build: ## Install the dependencies
21+
build: ensure-composer-file
22+
make 'composer-install --optimize-autoloader --prefer-dist ${PREFER_LOWEST}'
23+
24+
build-update: ## Update the dependencies
25+
build-update: ensure-composer-file
26+
make 'composer-update --optimize-autoloader --prefer-dist ${PREFER_LOWEST}'
1927

20-
build-update: ## Update and download the dependencies
21-
make 'composer-update --optimize-autoloader'
28+
ensure-composer-file: # Update the composer file
29+
make 'composer-config platform.php ${PHP_VER}'
2230

2331
composer-%: ## Run a composer command, `make "composer-<command> [...]"`.
2432
${DOCKER} run -t --rm \
2533
-v $$(pwd):/app:delegated \
2634
-v ~/.composer:/tmp:delegated \
27-
composer --no-interaction --prefer-dist $* $(filter-out $@,$(MAKECMDGOALS))
35+
-v ~/.ssh:/root/.ssh:ro \
36+
composer --ansi --no-interaction $* $(filter-out $@,$(MAKECMDGOALS))
2837

2938
# Testing
3039

@@ -43,12 +52,15 @@ test-unit: ## Run the unit testsuite.
4352
test-integration: ## Run the integration testsuite.
4453
${DOCKER_RUN} vendor/bin/phpunit --colors=always --testsuite integration
4554

55+
test-matrix-lowest: ## Test all version, with the lowest version
56+
${MAKE} test-matrix PREFER_LOWEST='--prefer-lowest --prefer-stable'
57+
${MAKE} build-update
58+
4659
test-matrix: ## Run the unit tests against multiple targets.
47-
make DOCKER_REPOSITORY="php:5.6-alpine" test
48-
make DOCKER_REPOSITORY="php:7.0-alpine" test
49-
make DOCKER_REPOSITORY="php:7.1-alpine" test
50-
make DOCKER_REPOSITORY="php:7.2-alpine" test
51-
make DOCKER_REPOSITORY="hhvm/hhvm:latest" test
60+
${MAKE} PHP_VER="5.6" build-update test
61+
${MAKE} PHP_VER="7.0" build-update test
62+
${MAKE} PHP_VER="7.1" build-update test
63+
${MAKE} PHP_VER="7.2" build-update test
5264

5365
test-coverage: ## Run all tests and output coverage to the console.
5466
${DOCKER_RUN} phpdbg7 -qrr vendor/bin/phpunit --coverage-text

composer.json

+42-36
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,45 @@
11
{
2-
"name": "graze/queue",
3-
"description": ":postbox: Flexible abstraction for working with queues in PHP.",
4-
"license": "MIT",
5-
"authors": [
6-
{
7-
"name": "Graze Developers",
8-
"email": "[email protected]",
9-
"homepage": "https://github.com/graze/queue/graphs/contributors"
10-
}
11-
],
12-
"autoload": {
13-
"psr-4": {
14-
"Graze\\Queue\\": "src/"
15-
}
16-
},
17-
"autoload-dev": {
18-
"classmap": [
19-
"tests/unit/",
20-
"tests/integration"
21-
]
22-
},
23-
"require": {
24-
"php": ">=5.5",
25-
"graze/data-structure": "^2.0"
26-
},
27-
"require-dev": {
28-
"aws/aws-sdk-php": "^3.0",
29-
"hamcrest/hamcrest-php": "^1.2",
30-
"mockery/mockery": "^0.9",
31-
"phpunit/phpunit": "^4.8",
32-
"squizlabs/php_codesniffer": "^2.7,<2.8.1",
33-
"graze/hamcrest-test-listener": "^1.0",
34-
"graze/standards": "^1.0"
35-
},
36-
"suggest": {
37-
"aws/aws-sdk-php": "Required when using the SQS Adapter"
2+
"name": "graze/queue",
3+
"description": ":postbox: Flexible abstraction for working with queues in PHP.",
4+
"license": "MIT",
5+
"authors": [
6+
{
7+
"name": "Graze Developers",
8+
"email": "[email protected]",
9+
"homepage": "https://github.com/graze/queue/graphs/contributors"
3810
}
11+
],
12+
"autoload": {
13+
"psr-4": {
14+
"Graze\\Queue\\": "src/",
15+
"Graze\\Queue\\Test\\": "tests/src/"
16+
}
17+
},
18+
"autoload-dev": {
19+
"classmap": [
20+
"tests/unit/",
21+
"tests/integration"
22+
]
23+
},
24+
"require": {
25+
"php": "^5.5|^7",
26+
"graze/data-structure": "^2"
27+
},
28+
"require-dev": {
29+
"aws/aws-sdk-php": "^3",
30+
"hamcrest/hamcrest-php": "^2",
31+
"mockery/mockery": "^1",
32+
"phpunit/phpunit": "^5.7.21|^6|^7",
33+
"squizlabs/php_codesniffer": "^3",
34+
"graze/standards": "^2",
35+
"graze/hamcrest-test-listener": "^2|^3"
36+
},
37+
"suggest": {
38+
"aws/aws-sdk-php": "Required when using the SQS Adapter"
39+
},
40+
"config": {
41+
"platform": {
42+
"php": "7.2"
43+
}
44+
}
3945
}

0 commit comments

Comments
 (0)