diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index c66c0fa8f..e6c8bc090 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -36,7 +36,7 @@ runs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
- coverage: none
+ coverage: xdebug
extensions: "mongodb-${{ inputs.driver-version }}"
php-version: "${{ inputs.php-version }}"
tools: cs2pr
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 956e0ec61..59226167d 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -23,36 +23,38 @@ jobs:
fail-fast: true
matrix:
os:
- - "ubuntu-22.04"
+ - "ubuntu-24.04"
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
mongodb-version:
- - "6.0"
+ - "8.0"
topology:
- - "server"
+ - "replica_set"
include:
+ # Test additional topologies for MongoDB 8.0
+ - os: "ubuntu-24.04"
+ php-version: "8.4"
+ mongodb-version: "8.0"
+ topology: "server"
+ - os: "ubuntu-24.04"
+ php-version: "8.4"
+ mongodb-version: "8.0"
+ topology: "sharded_cluster"
+ # Test lowest server/php versions
- os: "ubuntu-22.04"
php-version: "8.1"
mongodb-version: "6.0"
- topology: "replica_set"
+ topology: "server"
- os: "ubuntu-22.04"
php-version: "8.1"
mongodb-version: "6.0"
- topology: "sharded_cluster"
- - os: "ubuntu-24.04"
- php-version: "8.1"
- mongodb-version: "8.0"
- topology: "server"
- - os: "ubuntu-24.04"
- php-version: "8.1"
- mongodb-version: "8.0"
topology: "replica_set"
- - os: "ubuntu-24.04"
+ - os: "ubuntu-22.04"
php-version: "8.1"
- mongodb-version: "8.0"
+ mongodb-version: "6.0"
topology: "sharded_cluster"
steps:
@@ -81,6 +83,23 @@ jobs:
php-ini-values: "zend.assertions=1"
- name: "Run PHPUnit"
- run: "vendor/bin/phpunit"
+ run: "vendor/bin/phpunit --configuration phpunit.evergreen.xml --coverage-clover coverage.xml"
env:
+ XDEBUG_MODE: "coverage"
MONGODB_URI: ${{ steps.setup-mongodb.outputs.cluster-uri }}
+
+ - name: "Upload coverage report"
+ uses: codecov/codecov-action@v5
+ with:
+ disable_search: true
+ files: coverage.xml
+ flags: "${{ matrix.mongodb-version }}-${{ matrix.topology }}"
+ token: ${{ secrets.CODECOV_TOKEN }}
+
+ - name: Upload test results to Codecov
+ uses: codecov/test-results-action@v1
+ with:
+ disable_search: true
+ files: test-results.xml
+ flags: "${{ matrix.mongodb-version }}-${{ matrix.topology }}"
+ token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/phpunit.evergreen.xml b/phpunit.evergreen.xml
index b2e71bda3..42a1bfb41 100644
--- a/phpunit.evergreen.xml
+++ b/phpunit.evergreen.xml
@@ -25,6 +25,12 @@
+
+
+ src
+
+
+