Skip to content

Commit

Permalink
Created codecov.yml workflow and added the codecov badge in the READM…
Browse files Browse the repository at this point in the history
…E.md file
  • Loading branch information
blancks committed Aug 26, 2024
1 parent 890b904 commit 19d951d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Workflow for Codecov
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up php 8.1
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

- name: Install dependencies
run: composer self-update && composer install && composer dump-autoload

- name: Run tests and collect coverage
run: vendor/bin/phpunit --coverage-clover coverage.xml --configuration phpunit.xml --teamcity

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ PHP Fast JSON Patch
=====================

![Test](https://github.com/blancks/fast-jsonpatch-php/workflows/Test/badge.svg)
[![codecov](https://codecov.io/github/blancks/fast-jsonpatch-php/graph/badge.svg?token=3PUC5RAPPQ)](https://codecov.io/github/blancks/fast-jsonpatch-php)
[![PHP Version Require](https://poser.pugx.org/blancks/fast-jsonpatch-php/require/php)](https://packagist.org/packages/blancks/fast-jsonpatch-php)
[![Latest Stable Version](https://poser.pugx.org/blancks/fast-jsonpatch-php/v)](https://packagist.org/packages/blancks/fast-jsonpatch-php)

Expand Down

0 comments on commit 19d951d

Please sign in to comment.