44 push :
55jobs :
66 run :
7- runs-on : ubuntu-latest
7+ runs-on : ${{ matrix.os }}
88 strategy :
99 matrix :
10- tag : ["amd64" ]
11- php : ["8.4"]
12- name : PHP ${{ matrix.php }} Test on ${{ matrix.tag }}
10+ os : [ubuntu-latest ]
11+ php-versions : ["8.2", "8.3", "8.4"]
12+ name : PHP ${{ matrix.php-versions }} Test on ${{ matrix.os }}
1313 steps :
1414 - name : Checkout
15- uses : actions/checkout@v4
15+ uses : actions/checkout@v2
1616
1717 - name : Setup PHP
18- # Inputs to manual.sh are in this order - php, extensions, ini-values, coverage, tools
19- run : curl -sL https://setup-php.com/manual.sh | bash -s ${{ matrix.php }} "mbstring, intl, sockets" "memory_limit=-1" "xdebug"
18+ uses : shivammathur/setup-php@v2
19+ with :
20+ php-version : ${{ matrix.php-versions }}
21+ extensions : mbstring, intl, sockets
2022
2123 - name : Check environment
2224 run : |
@@ -28,21 +30,28 @@ jobs:
2830 run : echo "::set-output name=dir::$(composer config cache-files-dir)"
2931
3032 - name : Cache dependencies
31- uses : actions/cache@v3
33+ uses : actions/cache@v4
3234 with :
3335 path : ${{ steps.composercache.outputs.dir }}
34- key : ${{ matrix.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
35- restore-keys : ${{ matrix.os }}-composer-${{ matrix.php }}-
36-
37- - name : Install dependencies
38- run : composer install --prefer-dist
36+ key : ${{ matrix.os }}-composer-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
37+ restore-keys : ${{ matrix.os }}-composer-${{ matrix.php-versions }}-
3938
40- - name : Run tests
39+ - name : Run codestyle check
4140 env :
4241 PHP_CS_FIXER_IGNORE_ENV : 1
43- TOKEN : ${{ secrets.TOKEN }}
44- DEST : ${{ secrets.DEST }}
4542 run : |
46- vendor/bin/psalm --no-cache --shepherd
47- vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
4843 vendor/bin/php-cs-fixer --diff --dry-run -v fix
44+
45+ - name : Run unit tests
46+ run : |
47+ vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
48+
49+ - name : Run Psalm analysis
50+ run : |
51+ vendor/bin/psalm --shepherd
52+
53+ # - name: Upload coverage reports to Codecov
54+ # uses: codecov/codecov-action@v4.0.1
55+ # with:
56+ # token: ${{ secrets.CODECOV_TOKEN }}
57+ # slug: danog/AsyncOrm
0 commit comments