Skip to content

Commit bd1ccf4

Browse files
committed
Add codecov
1 parent 821ae33 commit bd1ccf4

File tree

1 file changed

+46
-3
lines changed

1 file changed

+46
-3
lines changed

.github/workflows/push.yml

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ permissions:
4040
concurrency:
4141
group: ${{ github.workflow }}-${{ github.event.pull_request.url || github.run_id }}
4242
cancel-in-progress: true
43-
env:
44-
CC: ccache gcc
45-
CXX: ccache g++
4643
jobs:
4744
LINUX_X64:
4845
services:
@@ -206,6 +203,52 @@ jobs:
206203
run: .github/scripts/windows/build.bat
207204
- name: Test
208205
run: .github/scripts/windows/test.bat
206+
COVERAGE_DEBUG_NTS:
207+
services:
208+
postgres:
209+
image: postgres
210+
env:
211+
POSTGRES_USER: postgres
212+
POSTGRES_PASSWORD: postgres
213+
POSTGRES_DB: test
214+
runs-on: ubuntu-22.04
215+
steps:
216+
- name: git checkout
217+
uses: actions/checkout@v4
218+
with:
219+
fetch-depth: 0
220+
- name: Create MSSQL container
221+
uses: ./.github/actions/setup-mssql
222+
- name: apt
223+
uses: ./.github/actions/apt-x64
224+
- name: ccache
225+
uses: hendrikmuhs/[email protected]
226+
with:
227+
key: "${{github.job}}-cov-${{hashFiles('main/php_version.h')}}"
228+
append-timestamp: false
229+
- name: Install gcovr
230+
run: sudo -H pip install gcovr
231+
- name: ./configure
232+
uses: ./.github/actions/configure-x64
233+
with:
234+
configurationParameters: --enable-debug --disable-zts --enable-gcov
235+
- name: make
236+
run: make -j$(/usr/bin/nproc) >/dev/null
237+
- name: make install
238+
uses: ./.github/actions/install-linux
239+
- name: Setup
240+
uses: ./.github/actions/setup-x64
241+
# We only test with OpCache, the difference in coverage is negligible
242+
- name: Test OpCache
243+
uses: ./.github/actions/test-linux
244+
with:
245+
jitType: tracing
246+
runTestsParameters: >-
247+
-d zend_extension=opcache.so
248+
-d opcache.enable_cli=1
249+
- name: Upload Test Coverage to Codecov.io
250+
if: always()
251+
run: bash <(curl -s https://codecov.io/bash)
209252
BENCHMARKING:
210253
name: BENCHMARKING
211254
if: github.repository_owner == 'php' || github.event_name == 'pull_request'

0 commit comments

Comments
 (0)