chore: cleanup composer requirements specs, drop support for php < 8.1 #88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
pull_request_target: | |
types: [opened, synchronize] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
versions: | |
# PHP, SF, DB, Ser, MongoDB | |
- [8.1, 4.4, sqlite, true, '', '', 'mongodb://localhost:27017/'] | |
- [8.1, 5.0, sqlite, true, '', '', 'mongodb://localhost:27017/'] | |
- [8.1, 6.0, sqlite, true, '', '', 'mongodb://localhost:27017/'] | |
- [8.2, 6.0, sqlite, true, '', '', 'mongodb://localhost:27017/'] | |
- [8.3, 6.0, sqlite, true, '', '', 'mongodb://localhost:27017/'] | |
- [8.2, 7.0, sqlite, true, '', '', 'mongodb://localhost:27017/'] | |
- [8.3, 7.0, sqlite, true, '', '', 'mongodb://localhost:27017/'] | |
- [8.4, 7.2, sqlite, true, '', '', 'mongodb://localhost:27017/'] | |
- [8.1, 5.0, sqlite, false, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/?authSource=admin'] | |
- [8.1, 5.0, sqlite, true, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/?authSource=admin'] | |
- [8.1, 5.0, sqlite, false, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/other_db/queue?authSource=admin'] | |
- [8.1, 5.0, sqlite, true, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/other_db/queue?authSource=admin'] | |
- [8.1, 6.0, sqlite, false, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/other_db/queue?authSource=admin'] | |
- [8.1, 6.0, sqlite, true, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/other_db/queue?authSource=admin'] | |
- [8.2, 6.0, sqlite, true, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/other_db/queue?authSource=admin'] | |
- [8.3, 6.0, sqlite, true, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/other_db/queue?authSource=admin'] | |
- [8.2, 7.0, sqlite, true, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/other_db/queue?authSource=admin'] | |
- [8.3, 7.0, sqlite, true, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/other_db/queue?authSource=admin'] | |
- [8.4, 7.2, sqlite, true, 'admin', 'admin_pass', 'mongodb://admin:admin_pass@localhost:27017/other_db/queue?authSource=admin'] | |
name: Symfony ${{ matrix.versions[1] }} on PHP ${{ matrix.versions[0] }} with ${{ matrix.versions[2] }} database | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: messenger | |
ports: | |
- 3306:3306 | |
mongo: | |
image: mongo | |
env: | |
MONGO_INITDB_ROOT_USERNAME: ${{ matrix.versions[4] }} | |
MONGO_INITDB_ROOT_PASSWORD: ${{ matrix.versions[5] }} | |
options: >- | |
--health-cmd "mongosh --eval \"db.stats()\" -u \"$MONGO_INITDB_ROOT_USERNAME\" -p \"$MONGO_INITDB_ROOT_PASSWORD\"" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
--health-start-period 40s | |
ports: | |
- 27017:27017 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP with pecl extension | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.versions[0] }} | |
extensions: mongodb, :opcache | |
- uses: docker://mongo | |
if: matrix.versions[4] | |
with: | |
args: > | |
mongosh --host mongo:27017 -u ${{ matrix.versions[4] }} -p ${{ matrix.versions[5] }} admin --eval "db = db.getSiblingDB('default'); db.createUser({ user: '${{ matrix.versions[4] }}', pwd: '${{ matrix.versions[5] }}', roles: [ { role: 'readWrite', db: 'default' }], passwordDigestor: 'server' }) | |
- run: composer require --dev --no-update symfony/messenger=^${{ matrix.versions[1] }} | |
- run: composer remove --dev --no-update kcs/serializer | |
if: matrix.versions[3] | |
- run: composer install | |
- run: vendor/bin/phpunit | |
env: | |
DB: ${{ matrix.versions[2] }} | |
MONGODB_URI: ${{ matrix.versions[6] }} |