Skip to content

Commit

Permalink
separated coverage job
Browse files Browse the repository at this point in the history
Signed-off-by: Parajuli Kiran <kiranparajuli589@gmail.com>
  • Loading branch information
kiranparajuli589 committed Feb 21, 2022
1 parent 993846a commit 964a552
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
- name: Setup PHP ${{ matrix.phpVersion }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.phpVersion }}
Expand Down Expand Up @@ -62,8 +62,15 @@ jobs:
- name: PHP & Vue Unit Tests
run: make test

coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: JS Code Coverage Summary Report
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'master' }}
if: ${{ github.event_name == 'pull_request' }}
uses: romeovs/lcov-reporter-action@v0.3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -72,7 +79,7 @@ jobs:
title: "JS Code Coverage"

- name: Convert PHP cobertura coverage to lcov
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'master' }}
if: ${{ github.event_name == 'pull_request' }}
uses: danielpalme/ReportGenerator-GitHub-Action@5.0.3
with:
reports: './coverage/php/cobertura.xml' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
Expand All @@ -91,7 +98,7 @@ jobs:
toolpath: 'reportgeneratortool' # Default directory for installing the dotnet tool.

- name: PHP Code Coverage Summary Report
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'master' }}
if: ${{ github.event_name == 'pull_request' }}
uses: romeovs/lcov-reporter-action@v0.3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -100,14 +107,14 @@ jobs:
title: "PHP Code Coverage"

- name: JS coverage check
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'master' }}
if: ${{ github.event_name == 'pull_request' }}
uses: VeryGoodOpenSource/very_good_coverage@v1.2.0
with:
min_coverage: '24'
path: './coverage/jest/lcov.info'

- name: PHP coverage check
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'master' }}
if: ${{ github.event_name == 'pull_request' }}
uses: VeryGoodOpenSource/very_good_coverage@v1.2.0
with:
min_coverage: '36'
Expand Down

0 comments on commit 964a552

Please sign in to comment.