Fix #66
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
pull_request: | |
push: | |
jobs: | |
run: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
php-versions: ["8.2", "8.3", "8.4"] | |
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: mbstring, intl, sockets | |
- name: Check environment | |
run: | | |
php --version | |
composer --version | |
- name: Get composer cache directory | |
id: composercache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ matrix.os }}-composer-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ matrix.os }}-composer-${{ matrix.php-versions }}- | |
- name: Install dependencies | |
run: | | |
composer install --prefer-dist | |
- name: Run codestyle check | |
env: | |
PHP_CS_FIXER_IGNORE_ENV: 1 | |
run: | | |
vendor/bin/php-cs-fixer --diff --dry-run -v fix | |
- name: Run unit tests | |
env: | |
TOKEN: ${{ secrets.TOKEN }} | |
DEST: ${{ secrets.DEST }} | |
run: | | |
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml | |
- name: Run Psalm analysis | |
run: | | |
vendor/bin/psalm --shepherd | |
#- name: Upload coverage reports to Codecov | |
# uses: codecov/codecov-action@v4.0.1 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# slug: danog/AsyncOrm |