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 7
7
* .png binary
8
8
9
9
# 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
14
10
.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 13
13
strategy :
14
14
fail-fast : false
15
15
matrix :
16
- php-version : ['8.1', '8.2']
16
+ php-version : ['8.1', '8.2', '8.3' ]
17
17
18
18
steps :
19
19
- uses : actions/checkout@v3
@@ -26,11 +26,13 @@ jobs:
26
26
coverage : pcov
27
27
28
28
- name : Composer install
29
+ continue-on-error : ${{ matrix.php-version == '8.3' }}
29
30
run : |
30
31
composer --version
31
32
composer install
32
33
33
34
- name : Run PHPUnit
35
+ continue-on-error : ${{ matrix.php-version == '8.3' }}
34
36
run : |
35
37
if [[ ${{ matrix.php-version }} == '8.1' ]]; then
36
38
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 43
43
"scripts" : {
44
44
"test" : " phpunit" ,
45
45
"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" ,
47
47
"lowest" : " validate-prefer-lowest" ,
48
48
"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" ,
49
49
"cs-check" : " vendor/bin/phpcs" ,
You can’t perform that action at this time.
0 commit comments