Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
49 changes: 34 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
6 changes: 6 additions & 0 deletions phpunit.evergreen.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
</testsuite>
</testsuites>

<source>
<include>
<directory suffix=".php">src</directory>
</include>
</source>

<logging>
<junit outputFile="test-results.xml" />
</logging>
Expand Down