Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 35 additions & 41 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,52 @@
name: Code Coverage

# Controls when the workflow will run
on:
push:
branches: [ "master" ]
branches:
- master
pull_request:
branches: [ "master" ]

# Allows you to run this workflow manually from the Actions tab
branches:
- master
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.3]
php: ['8.2', 8.3, '8.3', '8.4']

name: PHP ${{ matrix.php }} - OS ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 3
- name: Setup PHP v${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, exif, iconv, tokenizer, fileinfo, xdebug
coverage: xdebug

- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-progress

- name: PHPUnit
run: |
./vendor/bin/phpunit --stop-on-failure --coverage-clover ./clover.xml
env:
XDEBUG_MODE: coverage

#- name: Make code coverage badge
# uses: timkrase/[email protected]
# with:
# coverage_badge_path: output/coverage.svg
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# push_badge: true
- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=./clover.xml --json_path=./coverall.xml -v
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 3

- name: Setup PHP v${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, exif, iconv, tokenizer, fileinfo, xdebug
coverage: xdebug

- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-progress

- name: PHPUnit
run: |
./vendor/bin/phpunit --stop-on-failure --coverage-clover ./clover.xml
env:
XDEBUG_MODE: coverage

- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=./clover.xml --json_path=./coverall.xml -v
12 changes: 11 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
php: [7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3]
laravel: ['6.*', '7.*', '8.*', '9.*', '10.*', '11.*']
laravel: ['6.*', '7.*', '8.*', '9.*', '10.*', '11.*', '12.*']
exclude:
- php: 7.2
laravel: 8.*
Expand Down Expand Up @@ -58,6 +58,16 @@ jobs:
php: 8.0
- laravel: 11.*
php: 8.1
- laravel: 12.*
php: 7.2
- laravel: 12.*
php: 7.3
- laravel: 12.*
php: 7.4
- laravel: 12.*
php: 8.0
- laravel: 12.*
php: 8.1

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} on ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
"require": {
"php": ">=7.1",
"laravel/framework": "~5.1|6.*|7.*|8.*|9.*|10.*|^11.0"
"laravel/framework": "~5.1|6.*|7.*|8.*|9.*|10.*|^11.0|^12.0"
},
"require-dev": {
"orchestra/testbench": ">=3.0",
Expand Down
Loading