Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] run CI with multiple versions of PHP (7.4, 8.0) #51

Merged
merged 1 commit into from
Feb 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ jobs:
strategy:
matrix:
nextcloudVersion: [ v23.0.0, master ]
phpVersion: [ 7.4, 8.0 ]
runs-on: ubuntu-latest
steps:
- 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 @@ -66,7 +67,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 @@ -75,7 +76,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 @@ -94,7 +95,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 @@ -103,14 +104,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