6
6
tests :
7
7
runs-on : ubuntu-latest
8
8
9
- services :
10
- mysql :
11
- image : mysql:5.7
12
- env :
13
- MYSQL_ALLOW_EMPTY_PASSWORD : true
14
- MYSQL_DATABASE : symfony_test
15
- ports :
16
- - 3306:3306
17
- options : >-
18
- --health-cmd "mysqladmin ping"
19
- --health-interval 10s
20
- --health-timeout 5s
21
- --health-retries 5
22
-
23
9
strategy :
24
10
matrix :
25
- php : [7.0, 7. 1, 7.2, 7.3, 7.4, 8.0]
26
- symfony : [3.4, 4, 5]
11
+ php : [7.1, 7.2, 7.3, 7.4, 8.0]
12
+ symfony : [3.4, 4.4 , 5]
27
13
exclude :
28
- - php : 7.3
29
- symfony : 3.4
30
- - php : 7.4
31
- symfony : 3.4
32
- - php : 8.0
33
- symfony : 3.4
34
- - php : 7.0
35
- symfony : 4
36
- - php : 7.0
37
- symfony : 5
38
14
- php : 7.1
39
15
symfony : 5
40
16
@@ -46,66 +22,71 @@ jobs:
46
22
uses : shivammathur/setup-php@v2
47
23
with :
48
24
php-version : ${{ matrix.php }}
49
- extensions : pdo, mysql, sqlite
25
+ tools : composer:v2
26
+ extensions : ctype, iconv, intl, json, mbstring, pdo, pdo_sqlite
50
27
coverage : none
51
28
52
29
- name : Checkout Symfony 3.4 Sample
53
30
if : matrix.symfony == 3.4
54
31
uses : actions/checkout@v2
55
32
with :
56
- repository : Naktibalda/codeception-symfony-tests
57
- path : framework-tests
33
+ repository : Codeception/symfony-module-tests
58
34
submodules : recursive
35
+ ref : 3.4
59
36
60
- - name : Checkout Symfony 4 Sample
61
- if : matrix.symfony == 4
37
+ - name : Checkout Symfony 4.4 Sample
38
+ if : matrix.symfony == 4.4
62
39
uses : actions/checkout@v2
63
40
with :
64
- repository : Codeception/symfony-demo
65
- path : framework-tests
41
+ repository : Codeception/symfony-module-tests
42
+ submodules : recursive
43
+ ref : 4.4
66
44
67
45
- name : Checkout Symfony 5 Sample
68
46
if : matrix.symfony == 5
69
47
uses : actions/checkout@v2
70
48
with :
71
- repository : Codeception/symfony-demo
72
- path : framework-tests
73
- ref : symfony5
49
+ repository : Codeception/symfony-module-tests
50
+ submodules : recursive
51
+ ref : main
52
+
53
+ - name : Validate composer.json and composer.lock
54
+ run : composer validate
55
+
56
+ - name : Get composer cache directory
57
+ id : composer-cache
58
+ run : echo "::set-output name=dir::$(composer config cache-files-dir)"
59
+
60
+ - name : Cache composer dependencies
61
+ uses : actions/cache@v2.1.3
62
+ with :
63
+ path : ${{ steps.composer-cache.outputs.dir }}
64
+ key : ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
65
+ restore-keys : ${{ runner.os }}-${{ matrix.php }}-composer-
74
66
75
67
- name : Install Symfony Sample on PHP7
76
68
if : matrix.php < 8
77
- run : composer update --no-dev --prefer-dist --no-interaction
78
- working-directory : framework-tests
69
+ run : composer update --no-progress
79
70
80
71
- name : Install Symfony Sample on PHP8
81
72
if : matrix.php == 8.0
82
- run : composer update --no-dev --prefer-dist --no-interaction --ignore-platform-req=php
83
- working-directory : framework-tests
73
+ run : composer update --no-progress --ignore-platform-req=php
84
74
85
- - name : Validate composer.json and composer.lock
86
- run : composer validate
75
+ - name : Yarn install
76
+ uses : borales/actions-yarn@v2.3.0
77
+ with :
78
+ cmd : install
87
79
88
- - name : Install dependencies
89
- run : |
90
- composer require "symfony/finder=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
91
- composer require "symfony/yaml=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
92
- composer require "symfony/console=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
93
- composer require "symfony/event-dispatcher=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
94
- composer require "symfony/css-selector=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
95
- composer require "symfony/dom-crawler=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
96
- composer require "symfony/browser-kit=~${{ matrix.symfony }}" --no-update --ignore-platform-reqs
97
- composer install --prefer-dist --no-progress --no-interaction --no-suggest
98
-
99
- - name : Database Symfony 3.4
100
- if : matrix.symfony == 3.4
101
- run : |
102
- sed -i -e "s/%database_host%/127.0.0.1/g" app/config/config.yml
103
- sed -i -e "s/%database_port%/3306/g" app/config/config.yml
104
- sed -i -e "s/%database_name%/symfony_test/g" app/config/config.yml
105
- sed -i -e "s/%database_user%/root/g" app/config/config.yml
106
- sed -i -e "s/%database_password%//g" app/config/config.yml
107
- php bin/console doctrine:schema:update --force -n
108
- working-directory : framework-tests
80
+ - name : Yarn build
81
+ uses : borales/actions-yarn@v2.3.0
82
+ with :
83
+ cmd : run encore production
84
+
85
+ - name : Update database schema
86
+ run : php bin/console d:s:u -f
87
+
88
+ - name : Load Doctrine fixtures
89
+ run : php bin/console d:f:l -q
109
90
110
91
- name : Run test suite Symfony
111
- run : php vendor/bin/codecept run functional -c framework-tests
92
+ run : php vendor/bin/codecept run Functional
0 commit comments