Skip to content

Commit

Permalink
Add codecov workflow (#19)
Browse files Browse the repository at this point in the history
* add codecov workflow

* add badge
  • Loading branch information
devmoath authored Mar 11, 2022
1 parent 2b729b1 commit 0a6b9da
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: codecov

on:
push:
paths:
- '**.php'
- '.github/workflows/codecov.yml'
- 'composer.lock'
- 'composer.json'
pull_request:
paths:
- '**.php'
- '.github/workflows/codecov.yml'
- 'composer.lock'
- 'composer.json'

jobs:
codecov:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
coverage: xdebug

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Install dependencies
run: composer install --prefer-dist --no-interaction

- name: Run tests
run: XDEBUG_MODE=coverage composer test

- uses: codecov/codecov-action@v2
with:
directory: ./coverage
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Tests Workflow Status](https://img.shields.io/github/workflow/status/devmoath/jql-builder/tests?label=Tests&style=for-the-badge)](https://github.com/DevMoath/jql-builder/actions/workflows/tests.yml)
[![phpstan Workflow Status](https://img.shields.io/github/workflow/status/devmoath/jql-builder/phpstan?label=phpstan&style=for-the-badge)](https://github.com/DevMoath/jql-builder/actions/workflows/phpstan.yml)
[![php-cs-fixer Workflow Status](https://img.shields.io/github/workflow/status/devmoath/jql-builder/php-cs-fixer?label=php-cs-fixer&style=for-the-badge)](https://github.com/DevMoath/jql-builder/actions/workflows/php-cs-fixer.yml)
[![Code Coverage Percentage](https://img.shields.io/codecov/c/gh/devmoath/jql-builder?style=for-the-badge&token=L3WY57B8P1)](https://codecov.io/gh/DevMoath/jql-builder)

Simple JQL builder for Jira search

Expand Down

0 comments on commit 0a6b9da

Please sign in to comment.