@@ -10,52 +10,34 @@ permissions:
10
10
contents : read
11
11
12
12
jobs :
13
- tests :
14
- runs-on : ${{ matrix.os }}
13
+ testsuite :
14
+ name : Testsuite
15
+
16
+ runs-on : ubuntu-latest
15
17
16
18
env :
17
19
ENV : DEVELOPMENT
18
20
19
- strategy :
20
- fail-fast : true
21
- matrix :
22
- os : [ubuntu-latest]
23
- php : ['8.3']
24
- dependency_version : [prefer-dist, prefer-source]
25
-
26
- name : PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency_version }}
27
-
28
21
steps :
29
- - name : Checkout
30
- uses : actions/checkout@v4
22
+ - uses : actions/checkout@v4
31
23
32
- - name : Setup PHP & Enable Extensions
33
- uses : shivammathur/setup-php@v2
34
- with :
35
- php-version : ${{ runner.php }}
36
- extensions : uopz
37
- coverage : pcov
24
+ - name : Build the Docker image
25
+ run : docker build --file Dockerfile --target build-development --tag dockerized-php:dev .
38
26
39
27
- name : Validate composer.json and composer.lock
40
- run : composer validate --working-dir=./src --strict
41
-
42
- - name : Cache Composer packages
43
- id : composer-cache
44
- uses : actions/cache@v4
45
- with :
46
- path : ./src/vendor
47
- key : ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
48
- restore-keys : |
49
- ${{ runner.os }}-php-
28
+ run : docker run --rm --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer validate --ansi --working-dir=. --strict
50
29
51
30
- name : Install PHP dependencies
52
- run : composer install --working-dir=./src --${{ matrix.dependency_version }} --no-interaction --no-progress --ansi
31
+ run : docker run --rm --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer install --ansi --working-dir=. --no-interaction --no-progress
32
+
33
+ - name : Check Syntax
34
+ run : docker run --rm --interactive --mount type=bind,source="$(pwd)"/src,target=/var/www/html dockerized-php:dev composer check-syntax --ansi
53
35
54
- - name : Check Coding Standards
55
- run : ./src/vendor/bin/phpcs --standard=. /src/phpcs.xml ./src/app ./src/tests
36
+ - name : Check Style
37
+ run : docker run --rm --interactive --mount type=bind,source="$(pwd)" /src,target=/var/www/html dockerized-php:dev composer check-style --ansi
56
38
57
- - name : Check with PHPStan
58
- run : ./src/vendor/bin/phpstan analyse --configuration=. /src/phpstan.neon ./src/app ./src/tests
39
+ - name : Check PHPStan
40
+ run : docker run --rm --interactive --mount type=bind,source="$(pwd)" /src,target=/var/www/html dockerized-php:dev composer phpstan --ansi
59
41
60
- - name : Check Test Cases
61
- run : . /src/vendor/bin/phpunit --configuration=./src/phpunit.xml
42
+ - name : Check PHPUnit
43
+ run : docker run --rm --interactive --mount type=bind,source="$(pwd)" /src,target=/var/www/html dockerized-php:dev composer tests --ansi
0 commit comments