Skip to content

Commit 6c6f06c

Browse files
Bump wyrihaximus/async-test-utilities from 2.2.0 to 3.0.0
Bumps [wyrihaximus/async-test-utilities](https://github.com/WyriHaximus/php-async-test-utilities) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/WyriHaximus/php-async-test-utilities/releases) - [Commits](WyriHaximus/php-async-test-utilities@2.2.0...3.0.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Signed-off-by: Cees-Jan Kiewiet <[email protected]>
1 parent b7d62e9 commit 6c6f06c

File tree

9 files changed

+2548
-1029
lines changed

9 files changed

+2548
-1029
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,33 @@ on:
33
push:
44
pull_request:
55
jobs:
6+
generate-checks-strategy:
7+
name: Generate Checks
8+
runs-on: ubuntu-latest
9+
outputs:
10+
check: ${{ steps.generate-checks-strategy.outputs.check }}
11+
steps:
12+
- uses: actions/checkout@v1
13+
- id: generate-checks-strategy
14+
name: Generate check
15+
run: |
16+
printf "Checks found: %s\r\n" $(make task-list-ci)
17+
printf "::set-output name=check::%s" $(make task-list-ci)
18+
lint:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Lint Code Base
22+
uses: docker://github/super-linter:v2.2.0
623
composer-install:
724
strategy:
25+
fail-fast: false
826
matrix:
927
php: [7.4]
1028
composer: [lowest, current, highest]
29+
needs: lint
1130
runs-on: ubuntu-latest
1231
container:
13-
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.10-dev-root
32+
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root
1433
steps:
1534
- uses: actions/checkout@v1
1635
- name: Cache composer packages
@@ -19,29 +38,44 @@ jobs:
1938
path: ./vendor/
2039
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
2140
- name: Install Dependencies
22-
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist
41+
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
2342
if: matrix.composer == 'lowest'
2443
- name: Install Dependencies
25-
run: composer install --ansi --no-progress --no-interaction --prefer-dist
44+
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o
2645
if: matrix.composer == 'current'
2746
- name: Install Dependencies
28-
run: composer update --ansi --no-progress --no-interaction --prefer-dist
47+
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o
2948
if: matrix.composer == 'highest'
3049
qa:
3150
strategy:
51+
fail-fast: false
3252
matrix:
3353
php: [7.4]
3454
composer: [lowest, current, highest]
35-
qa: [lint, cs, stan, psalm, unit-ci, infection, composer-require-checker, composer-unused]
36-
needs: composer-install
55+
check: ${{ fromJson(needs.generate-checks-strategy.outputs.check) }}
56+
needs:
57+
- composer-install
58+
- generate-checks-strategy
3759
runs-on: ubuntu-latest
3860
container:
39-
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.10-dev-root
61+
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root
4062
steps:
4163
- uses: actions/checkout@v1
4264
- name: Cache composer packages
4365
uses: actions/cache@v1
4466
with:
4567
path: ./vendor/
4668
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
47-
- run: make ${{ matrix.qa }}
69+
- name: Install Dependencies
70+
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
71+
if: matrix.composer == 'lowest'
72+
- name: Install Dependencies
73+
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
74+
if: matrix.composer == 'current'
75+
- name: Install Dependencies
76+
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
77+
if: matrix.composer == 'highest'
78+
- name: Fetch Tags
79+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
80+
if: matrix.check == 'backward-compatibility-check'
81+
- run: make ${{ matrix.check }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
var
12
vendor

Makefile

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,64 @@ SHELL=bash
33

44
.PHONY: *
55

6+
DOCKER_CGROUP:=$(shell cat /proc/1/cgroup | grep docker | wc -l)
7+
68
ifneq ("$(wildcard /.dockerenv)","")
7-
DOCKER_RUN=
9+
IN_DOCKER=TRUE
10+
else ifneq ("$(DOCKER_CGROUP)","0")
11+
IN_DOCKER=TRUE
12+
else
13+
IN_DOCKER=FALSe
14+
endif
15+
16+
ifeq ("$(IN_DOCKER)","TRUE")
17+
DOCKER_RUN=
818
else
919
DOCKER_RUN=docker run --rm -it \
10-
-v `pwd`:`pwd` \
11-
-w `pwd` \
12-
"wyrihaximusnet/php:7.4-zts-alpine3.11-dev"
20+
-v "`pwd`:`pwd`" \
21+
-w "`pwd`" \
22+
"wyrihaximusnet/php:7.4-zts-alpine3.12-dev"
1323
endif
1424

15-
all: lint cs-fix cs stan psalm unit infection composer-require-checker composer-unused
25+
all: syntax-php cs-fix cs stan psalm unit infection composer-require-checker composer-unused backward-compatibility-check
1626

17-
lint:
27+
syntax-php: ## Lint PHP syntax
1828
$(DOCKER_RUN) vendor/bin/parallel-lint --exclude vendor .
1929

20-
cs:
21-
$(DOCKER_RUN) vendor/bin/phpcs --parallel=$(nproc)
30+
cs: ## Check the code for code style issues
31+
$(DOCKER_RUN) vendor/bin/phpcs --parallel=$(shell nproc)
2232

23-
cs-fix:
24-
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(nproc)
33+
cs-fix: ## Fix any automatically fixable code style issues
34+
$(DOCKER_RUN) vendor/bin/phpcbf --parallel=$(shell nproc)
2535

26-
stan:
36+
stan: ## Run static analysis (PHPStan)
2737
$(DOCKER_RUN) vendor/bin/phpstan analyse src tests --level max --ansi -c phpstan.neon
2838

29-
psalm:
30-
$(DOCKER_RUN) vendor/bin/psalm --threads=$(nproc) --shepherd --stats
39+
psalm: ## Run static analysis (Psalm)
40+
$(DOCKER_RUN) vendor/bin/psalm --threads=$(shell nproc) --shepherd --stats
3141

32-
unit:
42+
unit: ## Run tests
3343
$(DOCKER_RUN) vendor/bin/phpunit --colors=always -c phpunit.xml.dist --coverage-text --coverage-html covHtml --coverage-clover ./build/logs/clover.xml
3444

3545
unit-ci: unit
3646
if [ -f ./build/logs/clover.xml ]; then wget https://scrutinizer-ci.com/ocular.phar && sleep 3 && php ocular.phar code-coverage:upload --format=php-clover ./build/logs/clover.xml; fi
3747

38-
infection:
39-
$(DOCKER_RUN) vendor/bin/infection --ansi --min-msi=100 --min-covered-msi=100 --threads=$(nproc)
48+
infection: ## Run mutation testing
49+
$(DOCKER_RUN) vendor/bin/infection --ansi --min-msi=100 --min-covered-msi=100 --threads=$(shell nproc)
4050

41-
composer-require-checker:
51+
composer-require-checker: ## Ensure we require every package used in this package directly
4252
$(DOCKER_RUN) vendor/bin/composer-require-checker --ignore-parse-errors --ansi -vvv --config-file=composer-require-checker.json
4353

44-
composer-unused:
54+
composer-unused: ## Ensure we don't require any package we don't use in this package directly
4555
$(DOCKER_RUN) composer unused --ansi
56+
57+
backward-compatibility-check: ## Check code for backwards incompatible changes
58+
$(DOCKER_RUN) vendor/bin/roave-backward-compatibility-check || true
59+
60+
task-list-ci:
61+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%s\n", $$1}' | jq --raw-input --slurp -c 'split("\n")| .[0:-1]'
62+
63+
help:
64+
@printf "\033[33mUsage:\033[0m\n make [target]\n\n\033[33mTargets:\033[0m\n"
65+
@printf " \033[32m%-32s\033[0m %s\n" "all" "Runs everything"
66+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%-32s\033[0m %s\n", $$1, $$2}'

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"wyrihaximus/constants": "^1.4.3"
1919
},
2020
"require-dev": {
21-
"wyrihaximus/async-test-utilities": "^2.2",
21+
"wyrihaximus/async-test-utilities": "^3.0",
2222
"wyrihaximus/ticking-promise": "^1.6"
2323
},
2424
"config": {

0 commit comments

Comments
 (0)