File tree Expand file tree Collapse file tree 7 files changed +67
-6
lines changed Expand file tree Collapse file tree 7 files changed +67
-6
lines changed Original file line number Diff line number Diff line change 1+ ARG PHP_VERSION=8.2
2+ ARG PHPUNIT_VERSION=10.4.0
3+ ARG PHPSTAN_VERSION=1.10.38
4+
5+ FROM php:${PHP_VERSION}-cli-alpine
6+ COPY --from=composer /usr/bin/composer /usr/bin/composer
7+
8+ ARG PHPUNIT_VERSION
9+ ARG PHPSTAN_VERSION
10+
11+ RUN docker-php-ext-install bcmath && docker-php-ext-enable bcmath
12+ RUN wget -O phpunit https://phar.phpunit.de/phpunit-${PHPUNIT_VERSION}.phar && chmod +x phpunit
13+ RUN wget -O phpstan https://github.com/phpstan/phpstan/releases/download/${PHPSTAN_VERSION}/phpstan.phar && chmod +x phpstan
14+
Original file line number Diff line number Diff line change 1+ PHP_VERSION = 8.2
2+ PHPUNIT_VERSION = 10.4.0
3+ PHPSTAN_VERSION = 1.10.38
Original file line number Diff line number Diff line change 77* .png binary
88
99# Remove files for archives generated using `git archive`
10- phpunit.xml.dist export-ignore
11- .travis.yml export-ignore
12- .gitignore export-ignore
13- .gitattributes export-ignore
1410.editorconfig export-ignore
11+ .env export-ignore
12+ .gitattributes export-ignore
13+ .gitignore export-ignore
14+ phpcs.xml export-ignore
15+ phpstan.neon export-ignore
16+ phpunit.xml.dist export-ignore
17+ compose.yaml export-ignore
18+ Makefile export-ignore
19+
20+ # Remove directories for archives
21+ .docker / export-ignore
22+ .github / export-ignore
23+ tests / export-ignore
Original file line number Diff line number Diff line change 1313 strategy :
1414 fail-fast : false
1515 matrix :
16- php-version : ['8.1', '8.2']
16+ php-version : ['8.1', '8.2', '8.3' ]
1717
1818 steps :
1919 - uses : actions/checkout@v3
@@ -26,11 +26,13 @@ jobs:
2626 coverage : pcov
2727
2828 - name : Composer install
29+ continue-on-error : ${{ matrix.php-version == '8.3' }}
2930 run : |
3031 composer --version
3132 composer install
3233
3334 - name : Run PHPUnit
35+ continue-on-error : ${{ matrix.php-version == '8.3' }}
3436 run : |
3537 if [[ ${{ matrix.php-version }} == '8.1' ]]; then
3638 vendor/bin/phpunit --coverage-clover=coverage.xml
Original file line number Diff line number Diff line change 1+ install :
2+ @docker compose run --rm -it php composer install
3+
4+ phpunit :
5+ @docker compose run --rm -it php composer test
6+
7+ coverage :
8+ @docker compose run --rm -it php composer test-coverage
9+
10+ phpstan :
11+ @docker compose run --rm -it php composer stan
12+
13+ cs-check :
14+ @docker compose run --rm -it php composer cs-check
15+
16+ cs-fix :
17+ @docker compose run --rm -it php composer cs-fix
18+
19+ test : install cs-check phpstan phpunit
Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ services :
4+ php :
5+ build :
6+ context : .
7+ dockerfile : .docker/Dockerfile
8+ args :
9+ PHP_VERSION : " ${PHP_VERSION:-8.2}"
10+ PHPUNIT_VERSION : " ${PHPUNIT_VERSION:-10.4.0}"
11+ PHPSTAN_VERSION : " ${PHPSTAN_VERSION:-1.10.38}"
12+ volumes :
13+ - ./:/code
14+ working_dir : /code
Original file line number Diff line number Diff line change 4343 "scripts" : {
4444 "test" : " phpunit" ,
4545 "test-coverage" : " phpunit --log-junit tmp/coverage/unitreport.xml --coverage-html tmp/coverage --coverage-clover tmp/coverage/coverage.xml" ,
46- "stan" : " vendor/bin/ phpstan.phar analyse" ,
46+ "stan" : " phpstan analyse" ,
4747 "lowest" : " validate-prefer-lowest" ,
4848 "lowest-setup" : " composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction && cp composer.json composer.backup && composer require --dev dereuromark/composer-prefer-lowest && mv composer.backup composer.json" ,
4949 "cs-check" : " vendor/bin/phpcs" ,
You can’t perform that action at this time.
0 commit comments