Skip to content

Workflow file for this run

name: Workflow for Codecov example-php
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
extensions: dom, curl, libxml, mbstring, pcntl, pdo, sqlite, pdo_sqlite, bcmath, intl, iconv, fileinfo
tools: phpunit:latest
ini-values: memory_limit=512M
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer require "laravel/framework:10.*" --no-interaction --no-update
- name: Update dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --prefer-stable --no-interaction
- name: Run tests and collect coverage
run: vendor/bin/phpunit --configuration ./phpunit.xml.dist --coverage-clover coverage.xml .
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3