-
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 1.89 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: 'Run Tests'
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.can-fail }}
strategy:
fail-fast: true
matrix:
php: ['8.1', '8.2', '8.3']
symfony: ['5.4.*', '6.4.*', '7.0.*']
composer-flags: ['--prefer-stable']
can-fail: [false]
has-mongodb: [true]
extensions: ['curl, iconv, mbstring, mongodb, pdo, pdo_sqlite, sqlite, zip']
include:
- php: '8.1'
symfony: '5.4.*'
composer-flags: '--prefer-stable --prefer-lowest'
extensions: 'curl, iconv, mbstring, mongodb, pdo, pdo_sqlite, sqlite, zip'
can-fail: false
has-mongodb: true
- php: '8.3'
symfony: '7.0.*'
composer-flags: '--prefer-stable --prefer-lowest'
extensions: 'curl, iconv, mbstring, pdo, pdo_sqlite, sqlite, zip'
can-fail: false
has-mongodb: false
exclude:
- php: '8.1'
symfony: '7.0.*'
name: "PHP ${{ matrix.php }} - Symfony ${{ matrix.symfony }}${{ matrix.composer-flags != '' && format(' - Composer {0}', matrix.composer-flags) || '' }}"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2,flex
extensions: ${{ matrix.extensions }}
coverage: none
- name: Remove MongoDB
if: matrix.has-mongodb == false
run: |
composer remove --dev --no-update doctrine/mongodb-odm doctrine/mongodb-odm-bundle
- name: Install dependencies
run: |
composer update ${{ matrix.composer-flags }} --prefer-dist --no-suggest
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
- name: Execute tests
run: vendor/bin/phpunit