1
+ on :
2
+ pull_request :
3
+ branches-ignore : gh-pages
4
+ push :
5
+ branches-ignore : gh-pages
6
+
7
+ name : build
8
+
9
+ jobs :
10
+ linux :
11
+ name : PHP ${{ matrix.php }}-${{ matrix.os }}
12
+
13
+ env :
14
+ extensions : curl, mbstring, openssl, pdo, pdo_sqlite
15
+ SYMFONY_DEPRECATIONS_HELPER : weak
16
+
17
+ runs-on : ${{ matrix.os }}
18
+
19
+ strategy :
20
+ fail-fast : false
21
+ matrix :
22
+ os : [ubuntu-latest]
23
+ php : ["5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0"]
24
+
25
+ steps :
26
+ - name : Checkout
27
+ uses : actions/checkout@v2
28
+
29
+ - name : Install PHP
30
+ uses : shivammathur/setup-php@v2
31
+ with :
32
+ php-version : ${{ matrix.php }}
33
+ extensions : ${{ env.extensions }}
34
+ ini-values : memory_limit=-1, date.timezone='UTC'
35
+ coverage : xdebug
36
+ tools : composer:v2
37
+
38
+ - name : Determine composer cache directory
39
+ run : echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV
40
+
41
+ - name : Cache dependencies installed with composer
42
+ uses : actions/cache@v2
43
+ with :
44
+ path : ${{ env.COMPOSER_CACHE_DIR }}
45
+ key : php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
46
+ restore-keys : |
47
+ php${{ matrix.php }}-composer-
48
+
49
+ - name : Update composer
50
+ run : composer self-update
51
+
52
+ - name : Validate composer.json
53
+ run : composer validate
54
+
55
+ - name : Composer install
56
+ run : composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
57
+
58
+ - name : Run tests PHP 5.6, 7.0, 7.1, 7.3
59
+ if : matrix.php == '56' || matrix.php == '7.0' || matrix.php == '7.1' || matrix.php == '7.3'
60
+ run : |
61
+ php -S 127.0.0.1:8000 -t tests/data/app >/dev/null 2>&1 &
62
+ php codecept build
63
+ php codecept run cli,unit
64
+
65
+ - name : Run tests PHP 7.2, 7.4
66
+ if : matrix.php == '7.2' || matrix.php == '7.4'
67
+ run : |
68
+ php -S 127.0.0.1:8000 -t tests/data/app -d pcov.directory=$(pwd)/tests/data/app >/dev/null 2>&1 &
69
+ php codecept build
70
+ php codecept run cli,unit,coverage --env COVERAGE=1
71
+
72
+ - name : Run tests PHP 8.0
73
+ if : matrix.php == '8.0'
74
+ run : |
75
+ php -S 127.0.0.1:8000 -t tests/data/app -d pcov.directory=$(pwd)/tests/data/app >/dev/null 2>&1 &
76
+ php codecept build
77
+ php codecept run cli,unit,coverage --env COVERAGE=1
78
+
79
+ windows-latest :
80
+ name : PHP ${{ matrix.php }}-${{ matrix.os }}
81
+
82
+ env :
83
+ extensions : curl, mbstring, openssl, pdo, pdo_sqlite
84
+ SYMFONY_DEPRECATIONS_HELPER : weak
85
+
86
+ runs-on : ${{ matrix.os }}
87
+
88
+ strategy :
89
+ fail-fast : false
90
+ matrix :
91
+ os : [windows-latest]
92
+
93
+ php : ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0"]
94
+
95
+ steps :
96
+ - name : Checkout
97
+ uses : actions/checkout@v2
98
+
99
+ - name : Install PHP
100
+ uses : shivammathur/setup-php@v2
101
+ with :
102
+ php-version : ${{ matrix.php }}
103
+ extensions : ${{ env.extensions }}
104
+ ini-values : memory_limit=-1, date.timezone='UTC'
105
+ tools : composer:v2
106
+
107
+ - name : Determine composer cache directory
108
+ run : echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
109
+
110
+ - name : Cache dependencies installed with composer
111
+ uses : actions/cache@v2
112
+ with :
113
+ path : ${{ env.COMPOSER_CACHE_DIR }}
114
+ key : php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
115
+ restore-keys : |
116
+ php${{ matrix.php }}-composer-
117
+
118
+ - name : Update composer
119
+ run : composer self-update
120
+
121
+ - name : Validate composer.json
122
+ run : composer validate
123
+
124
+ - name : Composer install
125
+ run : composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
126
+
127
+ - name : Run tests cli
128
+ run : php codecept run cli --skip-group coverage
129
+
130
+ - name : Run tests unit
131
+ run : php codecept run unit -g core -g appveyor
0 commit comments