Skip to content

Commit

Permalink
Run ci with multiple versions of php (7.4, 8.0) (#51)
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 6d06270 commit c01de4b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
strategy:
matrix:
nextcloudVersion: [ v23.0.0, master ]
phpVersion: [ 7.4, 8.0 ]
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
Expand All @@ -23,10 +24,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
- name: Setup PHP ${{ matrix.phpVersion }}
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: ${{ matrix.phpVersion }}
tools: composer, phpunit

- name: Setup NodeJS
Expand Down Expand Up @@ -72,7 +73,7 @@ jobs:
run: make test

- name: JS Code Coverage Summary Report
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'master' }}
if: ${{ github.event_name == 'pull_request' && matrix.nextcloudVersion == 'master' && matrix.phpVersion == '7.4' }}
uses: romeovs/lcov-reporter-action@v0.3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -81,7 +82,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' && matrix.nextcloudVersion == 'master' && matrix.phpVersion == '7.4' }}
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 @@ -100,7 +101,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' && matrix.nextcloudVersion == 'master' && matrix.phpVersion == '7.4' }}
uses: romeovs/lcov-reporter-action@v0.3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -109,14 +110,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' && matrix.nextcloudVersion == 'master' && matrix.phpVersion == '7.4' }}
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' && matrix.nextcloudVersion == 'master' && matrix.phpVersion == '7.4' }}
uses: VeryGoodOpenSource/very_good_coverage@v1.2.0
with:
min_coverage: '36'
Expand Down

0 comments on commit c01de4b

Please sign in to comment.