66 tests :
77 runs-on : ubuntu-latest
88
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-
239 strategy :
2410 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]
2713 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
3814 - php : 7.1
3915 symfony : 5
4016
@@ -46,66 +22,71 @@ jobs:
4622 uses : shivammathur/setup-php@v2
4723 with :
4824 php-version : ${{ matrix.php }}
49- extensions : pdo, mysql, sqlite
25+ tools : composer:v2
26+ extensions : ctype, iconv, intl, json, mbstring, pdo, pdo_sqlite
5027 coverage : none
5128
5229 - name : Checkout Symfony 3.4 Sample
5330 if : matrix.symfony == 3.4
5431 uses : actions/checkout@v2
5532 with :
56- repository : Naktibalda/codeception-symfony-tests
57- path : framework-tests
33+ repository : Codeception/symfony-module-tests
5834 submodules : recursive
35+ ref : 3.4
5936
60- - name : Checkout Symfony 4 Sample
61- if : matrix.symfony == 4
37+ - name : Checkout Symfony 4.4 Sample
38+ if : matrix.symfony == 4.4
6239 uses : actions/checkout@v2
6340 with :
64- repository : Codeception/symfony-demo
65- path : framework-tests
41+ repository : Codeception/symfony-module-tests
42+ submodules : recursive
43+ ref : 4.4
6644
6745 - name : Checkout Symfony 5 Sample
6846 if : matrix.symfony == 5
6947 uses : actions/checkout@v2
7048 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-
7466
7567 - name : Install Symfony Sample on PHP7
7668 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
7970
8071 - name : Install Symfony Sample on PHP8
8172 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
8474
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
8779
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
10990
11091 - 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