From b7f0950ffe8cf1fb37e57b40977a0416c39fa7f9 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 1 Mar 2022 18:53:23 +0100 Subject: [PATCH] Add test coverage job --- .github/workflows/nightly.yml | 31 ++++++++++++++++++++++ azure-pipelines.yml | 5 ---- azure/coverage_job.yml | 48 ----------------------------------- 3 files changed, 31 insertions(+), 53 deletions(-) delete mode 100644 azure/coverage_job.yml diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4d347323e89..16b99af3f73 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -153,3 +153,34 @@ jobs: -d opcache.jit=1205 - name: Verify generated files are up to date 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) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e896c993896..ce1546f8343 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -49,11 +49,6 @@ jobs: CFLAGS='-fsanitize=undefined,address -fno-sanitize-recover -DZEND_TRACK_ARENA_ALLOC' LDFLAGS='-fsanitize=undefined,address' 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 parameters: configurationName: DEBUG_NTS_FILE_CACHE diff --git a/azure/coverage_job.yml b/azure/coverage_job.yml deleted file mode 100644 index 20ce581fcbb..00000000000 --- a/azure/coverage_job.yml +++ /dev/null @@ -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())