fix: Wrap upsert function error handling (#22) #120
This file contains 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: Tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '*.md' | |
- '.github/**' | |
- 'example/**' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- '*.md' | |
- '.github/**' | |
- 'example/**' | |
jobs: | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [8.1, 8.2, 8.3] | |
experimental: [false] | |
include: | |
- php: 8.1 | |
analysis: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: PHP ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, intl, curl | |
ini-values: post_max_size=256M, max_execution_time=180 | |
coverage: xdebug | |
tools: composer:v2 | |
- name: Composer Install | |
run: composer install | |
- name: analysis | |
if: matrix.analysis | |
run: vendor/bin/phpstan | |
- name: Tests | |
run: | | |
mkdir -p ./build/logs | |
vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml | |
- name: Verify coverage file is created | |
run: | | |
if [ ! -f ./build/logs/clover.xml ]; then | |
echo "clover.xml file was not created" | |
exit 1 | |
fi | |
- name: Upload coverage | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
composer global require php-coveralls/php-coveralls | |
php-coveralls --coverage_clover=./build/logs/clover.xml -v | |