This repository was archived by the owner on Mar 15, 2023. It is now read-only.
File tree 1 file changed +46
-6
lines changed
1 file changed +46
-6
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,55 @@ name: Run Codeception test cases
3
3
on : [push]
4
4
5
5
jobs :
6
- build :
6
+ tests :
7
+ name : PHP ${{ matrix.php }} on ${{ matrix.os }}
8
+ runs-on : ${{ matrix.os }}
7
9
8
- runs-on : ubuntu-latest
10
+ strategy :
11
+ fail-fast : false
12
+ matrix :
13
+ os : [ubuntu-latest]
14
+ php : ['7.3']
15
+
16
+ services :
17
+ mysql :
18
+ image : mysql:5.7
19
+ env :
20
+ MYSQL_ROOT_PASSWORD : root
21
+ MYSQL_DATABASE : password
22
+ ports :
23
+ - 3306:3306
24
+ options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
9
25
10
26
steps :
11
- - uses : actions/checkout@v2
27
+ - name : Checkout
28
+ uses : actions/checkout@v2
29
+
30
+ - name : Install PHP
31
+ uses : shivammathur/setup-php@v2
32
+ with :
33
+ php-version : ${{ matrix.php }}
34
+ tools : pecl
35
+ extensions : curl
36
+
37
+ - name : Get composer cache directory
38
+ id : composer-cache
39
+ run : echo "::set-output name=dir::$(composer config cache-files-dir)"
40
+
41
+ - name : Cache composer dependencies
42
+ uses : actions/cache@v1
43
+ with :
44
+ path : ${{ steps.composer-cache.outputs.dir }}
45
+ key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
46
+ restore-keys : ${{ runner.os }}-composer-
12
47
13
48
- name : Install dependencies
14
- run : composer install
15
-
49
+ run : composer update $DEFAULT_COMPOSER_FLAGS
50
+
51
+ - name : DB migrations
52
+ run : ./yii_test migrate --migrationPath=src/migrations/ --interactive=0
53
+
16
54
- name : Run test cases
17
- run : php vendor/bin/codecept run
55
+ run : php vendor/bin/codecept run
56
+
57
+
You can’t perform that action at this time.
0 commit comments