-
Notifications
You must be signed in to change notification settings - Fork 59
65 lines (57 loc) · 2.19 KB
/
unit.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
62
63
64
65
on: [push, pull_request]
name: Unit test
jobs:
tests:
name: PHP ${{ matrix.php }} / SF ^${{ matrix.symfony }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [7.4, 8.0, 8.1, 8.2, 8.3]
symfony: [5.4.*, 6.4.*, 7.0.*]
exclude:
- php: 7.4
symfony: 6.4.*
- php: 7.4
symfony: 7.0.*
- php: 8.0
symfony: 6.4.*
- php: 8.0
symfony: 7.0.*
- php: 8.1
symfony: 7.0.*
services:
rabbitmq:
# 3.8.10 and later versions has enabled TLSv1.3 by default which is not supported by PHP images
# TLSv1.3 can be disabled by using configuration file, but not environment variables
image: rabbitmq:3.8.9-management
ports:
- 5671:5671
- 5672:5672
- 15671:15671
- 15672:15672
env:
RABBITMQ_DEFAULT_VHOST: swarrot
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: amqp
coverage: none
- name: Start broker service
run: docker restart ${{ job.services.rabbitmq.id }}
- name: Install Symfony Flex
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts symfony/flex
- name: Install the dependencies
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
run: composer install --no-interaction --prefer-dist --no-progress --no-suggest
- name: Wait for broker service
run: Tests/bin/wait_broker
- name: Run the unit tests
run: vendor/bin/phpunit --colors=always