Skip to content

Add CI/CD and phpstan-related fixes #1

Add CI/CD and phpstan-related fixes

Add CI/CD and phpstan-related fixes #1

Workflow file for this run

name: test and deploy
on:
workflow_dispatch: ~
push: ~
release:
types: [published]
jobs:
phpunit:
strategy:
matrix:
php: [8.1, 8.2, 8.3, 8.4]
imageTag: ['latest']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json,mbstring,pcre,yaml
coverage: xdebug
env:
fail-fast: true
- name: composer update
run: |
composer update
- name: phpstan
run: |
vendor/bin/phpstan analyze -l 6 src tests
- name: phpunit
run: |
XDEBUG_MODE=coverage vendor/bin/phpunit
- name: coveralls
run: |
export COVERALLS_RUN_LOCALLY=1
export COVERALLS_REPO_TOKEN=${{ secrets.coverallsToken }}
rm -fR composer.json composer.lock vendor
composer require php-coveralls/php-coveralls
php vendor/bin/php-coveralls -v