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

feat(tests): Add coverage from integration tests #11487

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
10 changes: 9 additions & 1 deletion .github/workflows/integration-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
php-version: ${{ matrix.php-versions }}
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql
coverage: none
coverage: xdebug
ini-file: development
# Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on
ini-values: apc.enable_cli=on, disable_functions=
Expand Down Expand Up @@ -151,6 +151,14 @@ jobs:
working-directory: apps/${{ env.APP_NAME }}/tests/integration
run: bash run.sh features/${{ matrix.test-suite }}

- name: Upload Unit test code coverage
uses: codecov/codecov-action@v3
with:
files: apps/${{ env.APP_NAME }}/clover.behat.xml
flags: behat-${{ matrix.test-suite }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Print logs
if: always()
run: |
Expand Down
1 change: 1 addition & 0 deletions tests/integration/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"require-dev": {
"behat/behat": "^3.12.0",
"dvdoug/behat-code-coverage": "^5.3",
"guzzlehttp/guzzle": "^7.5.0",
"phpunit/phpunit": "^9.5.28"
}
Expand Down
161 changes: 160 additions & 1 deletion tests/integration/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions tests/integration/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ default:
pretty:
output_styles:
comment: [ 'bright-blue' ]
extensions:
DVDoug\Behat\CodeCoverage\Extension:
filter:
include:
directories:
'../../lib':
'features/bootstrap':
reports:
clover:
target: '../../../clover.behat.xml'
html:
target: 'coverage'
lowUpperBound: 50
highLowerBound: 90
colors:
successLow: '#dff0d8'
successMedium: '#c3e3b5'
successHigh: '#99cb84'
warning: '#fcf8e3'
danger: '#f2dede'
autoload:
'': '%paths.base%/../features/bootstrap'
suites:
Expand Down
Loading