Skip to content

Commit

Permalink
Add code coverage test
Browse files Browse the repository at this point in the history
  • Loading branch information
RikudouSage committed Aug 18, 2021
1 parent 788636a commit 38981ba
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,25 @@ jobs:
run: composer install
- name: Run tests
run: composer phpunit
# coverage:
# name: Report Coverage
# runs-on: ubuntu-latest
# steps:
# - name: Setup PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: 8.0
# - name: Checkout Code
# uses: actions/checkout@v2
# with:
# submodules: true
# - name: Install Dependencies
# run: composer install
# - name: Generate Coverage
# run: composer phpunit -- --coverage-clover ./build/logs/clover.xml
# - name: Download Coverage Client
# run: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar
# - name: Publish Coverage (Coveralls)
# run: php php-coveralls.phar -v
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
coverage:
name: Report Coverage
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
- name: Checkout Code
uses: actions/checkout@v2
with:
submodules: true
- name: Install Dependencies
run: composer install
- name: Generate Coverage
run: composer phpunit -- --coverage-clover ./build/logs/clover.xml
- name: Download Coverage Client
run: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar
- name: Publish Coverage (Coveralls)
run: php php-coveralls.phar -v
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Tests](https://github.com/Unleash/UnleashSDK/actions/workflows/tests.yaml/badge.svg)](https://github.com/Unleash/UnleashSDK/actions/workflows/tests.yaml)
[![Tests (7.x)](https://github.com/Unleash/UnleashSDK/actions/workflows/tests-7.x.yaml/badge.svg)](https://github.com/Unleash/UnleashSDK/actions/workflows/tests-7.x.yaml)
[![Tests](https://github.com/Unleash/unleash-client-php/actions/workflows/tests.yaml/badge.svg)](https://github.com/Unleash/unleash-client-php/actions/workflows/tests.yaml)
[![Tests (7.x)](https://github.com/Unleash/unleash-client-php/actions/workflows/tests-7.x.yaml/badge.svg)](https://github.com/Unleash/unleash-client-php/actions/workflows/tests-7.x.yaml)
[![Coverage Status](https://img.shields.io/coveralls/github/Unleash/unleash-client-php?label=Code%20Coverage)](https://coveralls.io/github/Unleash/unleash-client-php?branch=master)

A PHP implementation of the [Unleash protocol](https://www.getunleash.io/)
aka [Feature Flags](https://docs.gitlab.com/ee/operations/feature_flags.html) in GitLab.
Expand Down

0 comments on commit 38981ba

Please sign in to comment.