mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Add test coverage job
This commit is contained in:
parent
9405f43ba9
commit
b7f0950ffe
3 changed files with 31 additions and 53 deletions
31
.github/workflows/nightly.yml
vendored
31
.github/workflows/nightly.yml
vendored
|
@ -153,3 +153,34 @@ jobs:
|
||||||
-d opcache.jit=1205
|
-d opcache.jit=1205
|
||||||
- name: Verify generated files are up to date
|
- name: Verify generated files are up to date
|
||||||
uses: ./.github/actions/verify-generated-files
|
uses: ./.github/actions/verify-generated-files
|
||||||
|
COVERAGE_DEBUG_NTS:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: git checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Create mssql container
|
||||||
|
uses: ./.github/actions/mssql
|
||||||
|
- name: apt
|
||||||
|
uses: ./.github/actions/apt-x64
|
||||||
|
- name: Install gcovr
|
||||||
|
run: sudo -H pip install gcovr
|
||||||
|
- name: ./configure
|
||||||
|
uses: ./.github/actions/configure-x64
|
||||||
|
with:
|
||||||
|
configurationParameters: --enable-debug --disable-zts --enable-gcov
|
||||||
|
- name: make
|
||||||
|
run: make -j$(/usr/bin/nproc) >/dev/null
|
||||||
|
- name: make install
|
||||||
|
uses: ./.github/actions/install-linux
|
||||||
|
- name: Setup
|
||||||
|
uses: ./.github/actions/setup-x64
|
||||||
|
# We only test with OpCache, the difference in coverage is negligible
|
||||||
|
- name: Test OpCache
|
||||||
|
uses: ./.github/actions/test-linux
|
||||||
|
with:
|
||||||
|
runTestsParameters: >-
|
||||||
|
-d zend_extension=opcache.so
|
||||||
|
-d opcache.enable_cli=1
|
||||||
|
- name: Upload Test Coverage to Codecov.io
|
||||||
|
if: always()
|
||||||
|
run: bash <(curl -s https://codecov.io/bash)
|
||||||
|
|
|
@ -49,11 +49,6 @@ jobs:
|
||||||
CFLAGS='-fsanitize=undefined,address -fno-sanitize-recover -DZEND_TRACK_ARENA_ALLOC'
|
CFLAGS='-fsanitize=undefined,address -fno-sanitize-recover -DZEND_TRACK_ARENA_ALLOC'
|
||||||
LDFLAGS='-fsanitize=undefined,address'
|
LDFLAGS='-fsanitize=undefined,address'
|
||||||
timeoutInMinutes: 90
|
timeoutInMinutes: 90
|
||||||
- template: azure/coverage_job.yml
|
|
||||||
parameters:
|
|
||||||
configurationName: COVERAGE_DEBUG_ZTS
|
|
||||||
configurationParameters: '--enable-debug --disable-zts'
|
|
||||||
timeoutInMinutes: 90
|
|
||||||
- template: azure/file_cache_job.yml
|
- template: azure/file_cache_job.yml
|
||||||
parameters:
|
parameters:
|
||||||
configurationName: DEBUG_NTS_FILE_CACHE
|
configurationName: DEBUG_NTS_FILE_CACHE
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
parameters:
|
|
||||||
configurationName: ''
|
|
||||||
configurationParameters: ''
|
|
||||||
runTestsParameters: ''
|
|
||||||
timeoutInMinutes: 60
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: ${{ parameters.configurationName }}
|
|
||||||
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
|
|
||||||
pool:
|
|
||||||
vmImage: 'ubuntu-20.04'
|
|
||||||
steps:
|
|
||||||
- template: apt.yml
|
|
||||||
- script: |
|
|
||||||
sudo -H pip install gcovr
|
|
||||||
displayName: 'Install gcovr'
|
|
||||||
- template: configure.yml
|
|
||||||
parameters:
|
|
||||||
configurationParameters: --enable-gcov ${{ parameters.configurationParameters }}
|
|
||||||
- script: make -j$(/usr/bin/nproc) >/dev/null
|
|
||||||
displayName: 'Make Build'
|
|
||||||
- template: install.yml
|
|
||||||
- template: setup.yml
|
|
||||||
- template: test.yml
|
|
||||||
parameters:
|
|
||||||
configurationName: ${{ parameters.configurationName }}
|
|
||||||
runTestsParameters: ${{ parameters.runTestsParameters }}
|
|
||||||
- template: test.yml
|
|
||||||
parameters:
|
|
||||||
configurationName: ${{ parameters.configurationName }}
|
|
||||||
runTestsName: 'OpCache'
|
|
||||||
runTestsParameters: >-
|
|
||||||
${{ parameters.runTestsParameters }}
|
|
||||||
-d zend_extension=opcache.so
|
|
||||||
- script: bash <(curl -s https://codecov.io/bash)
|
|
||||||
displayName: 'Upload ${{ parameters.configurationName }} Test Coverage to Codecov.io'
|
|
||||||
condition: or(succeeded(), failed())
|
|
||||||
- script: |
|
|
||||||
make gcovr-xml
|
|
||||||
mv gcovr.xml coverage.xml
|
|
||||||
displayName: 'Generate ${{ parameters.configurationName }} Test Coverage Cobertura XML Report'
|
|
||||||
condition: or(succeeded(), failed())
|
|
||||||
- task: PublishCodeCoverageResults@1
|
|
||||||
inputs:
|
|
||||||
codeCoverageTool: 'Cobertura'
|
|
||||||
summaryFileLocation: coverage.xml
|
|
||||||
displayName: 'Publish ${{ parameters.configurationName }} Test Coverage'
|
|
||||||
condition: or(succeeded(), failed())
|
|
Loading…
Add table
Add a link
Reference in a new issue