Skip to content

[3.x] Add typed properties #388

[3.x] Add typed properties

[3.x] Add typed properties #388

Workflow file for this run

name: "Atlas CI"
on:
pull_request:
branches:
- "*.x"
- "feature/*"
push:
jobs:
atlas-local:
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
php-version:
- "8.4"
symfony:
- "stable"
proxy:
- "native"
steps:
- name: "Checkout"
uses: "actions/checkout@v5"
with:
fetch-depth: 2
- name: "Create MongoDB Atlas Local"
run: |
docker run --name mongodb -p 27017:27017 --detach mongodb/mongodb-atlas-local:8.2
until docker exec --tty mongodb mongosh --eval "db.runCommand({ ping: 1 })"; do
sleep 1
done
until docker exec --tty mongodb mongosh --eval "db.createCollection('connection_test') && db.getCollection('connection_test').createSearchIndex({mappings:{dynamic: true}})"; do
sleep 1
done
- name: "Show MongoDB server status"
run: |
docker exec --tty mongodb mongosh --eval "db.runCommand({ serverStatus: 1 })"
- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-version }}
extensions: "mongodb, bcmath"
key: "extcache-v1"
- name: Cache extensions
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
tools: "pecl"
extensions: "mongodb, bcmath"
coverage: "none"
ini-values: "zend.assertions=1"
- name: "Show driver information"
run: "php --ri mongodb"
# Not used, skip transient dependencies
- name: "Remove phpbench/phpbench"
run: composer remove --no-update --dev phpbench/phpbench
- name: "Configure Symfony ${{ matrix.symfony }}"
if: "${{ matrix.symfony != 'stable' }}"
run: |
composer config minimum-stability dev
# update symfony deps
composer require --no-update symfony/console:^${{ matrix.symfony }}
composer require --no-update symfony/var-dumper:^${{ matrix.symfony }}
composer require --no-update --dev symfony/cache:^${{ matrix.symfony }}
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v3"
with:
dependency-versions: "highest"
composer-options: "--prefer-dist"
- name: "Run PHPUnit with Atlas Local"
run: "vendor/bin/phpunit --group atlas"
env:
DOCTRINE_MONGODB_SERVER: "mongodb://127.0.0.1:27017/?directConnection=true"
USE_LAZY_GHOST_OBJECT: ${{ matrix.proxy == 'lazy-ghost' && '1' || '0' }}
USE_NATIVE_LAZY_OBJECT: ${{ matrix.proxy == 'native' && '1' || '0' }}