Skip to content

feat(lambda-qr,laravel-sentry-handler,laravel-session): add Dockerfile & update tests pipeline #73

feat(lambda-qr,laravel-sentry-handler,laravel-session): add Dockerfile & update tests pipeline

feat(lambda-qr,laravel-sentry-handler,laravel-session): add Dockerfile & update tests pipeline #73

name: laravel-sentry-handler-test
on:
push:
branches: [ master ]
paths:
- 'laravel-sentry-handler/**'
pull_request:
branches: [ master ]
paths:
- 'laravel-sentry-handler/**'
defaults:
run:
working-directory: ./laravel-sentry-handler
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php_version: [ 83, 84 ]
include:
- php_version: 83
record_coverage: true
continue-on-error: false
- php_version: 84
record_coverage: false
continue-on-error: true
concurrency:
group: laravel-sentry-handler-test-${{ github.workflow }}-${{ github.ref }}-${{ matrix.php_version }}
cancel-in-progress: true
container:
image: ghcr.io/abenevaut/vapor-ci:php${{ matrix.php_version }}
env:
php_xdebug_log: /var/task/xdebug-errors.log
steps:
- name: Checkout project
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Configure Composer cache
id: composer-cache
uses: actions/cache@v4
with:
path: laravel-sentry-handler/vendor
key: ${{ runner.os }}-node-php_${{ matrix.php_version }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-node-php_${{ matrix.php_version }}-
- name: Composer install
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install -o --no-interaction --prefer-dist
- name: Run tests
continue-on-error: ${{ matrix.continue-on-error }}
run: |
vendor/bin/phpstan analyse
vendor/bin/phpcs --standard=PSR12 src tests
vendor/bin/phpunit
- name: Send coverage
if: ${{ matrix.record_coverage }}
run: codecov -f coverage/clover.xml -F laravel-sentry-handler
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}