Skip to content

Bump amancevice/setup-code-climate from 1 to 2 #31

Bump amancevice/setup-code-climate from 1 to 2

Bump amancevice/setup-code-climate from 1 to 2 #31

Workflow file for this run

name: run-tests
on:
push:
paths:
- '**.php'
- '.github/workflows/run-tests.yml'
- 'phpunit.xml.dist'
- 'composer.json'
- 'composer.lock'
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
fail-fast: true
matrix:
php: [ 8.3, 8.2, 8.1 ]
# laravel: [ 11.*, 10.* ]
laravel: [ 10.* ]
stability: [ prefer-stable ]
# exclude:
# - php: 8.1
# laravel: 11.*
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-L${{ matrix.laravel }}-composer-${{ hashFiles('composer.json') }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: xdebug
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Setup Code Climate
uses: amancevice/setup-code-climate@v2
with:
cc_test_reporter_id: ${{ secrets.CC_TEST_REPORTER_ID }}
- name: Install Code Climate Test Reporter
run: cc-test-reporter before-build
- name: Run Tests
run: |
vendor/bin/pest --coverage-clover build/logs/clover.xml
- name: Upload coverage reports to Code Climate
run: |
cc-test-reporter after-build