forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (92 loc) · 3.6 KB
/
build.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: build
on: [push, pull_request]
env:
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
PHPUNIT_EXCLUDE_GROUP: db,wincache,xcache,zenddata
XDEBUG_MODE: coverage, develop
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
phpunit:
name: PHP ${{ matrix.php }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- php: 5.4
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 5.5
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 5.6
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 7.0
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 7.1
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 7.2
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 7.3
coverage: none
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 7.4
coverage: xdebug
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 8.0
coverage: none
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 8.1
coverage: none
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
os: ubuntu-latest
- php: 8.2
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
coverage: none
os: ubuntu-latest
steps:
- name: Generate french locale.
run: sudo locale-gen fr_FR.UTF-8
- name: Checkout.
uses: actions/checkout@v3
- name: Install PHP.
uses: shivammathur/setup-php@v2
with:
coverage: ${{ matrix.coverage }}
extensions: ${{ matrix.extensions }}
ini-values: apc.enabled=1,apc.shm_size=32M,apc.enable_cli=1, date.timezone='UTC', session.save_path="${{ runner.temp }}"
php-version: ${{ matrix.php }}
tools: pecl
- name: Install Memcached.
uses: niden/actions-memcached@v7
- name: Install dependencies.
run: composer update $DEFAULT_COMPOSER_FLAGS
- name: Run tests with PHPUnit.
if: matrix.php < '7.4' || matrix.php >= '8.1'
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
- name: Run tests with PHPUnit.
if: matrix.php == '8.0'
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
- name: Run tests with PHPUnit and generate coverage.
if: matrix.php == '7.4'
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --coverage-clover=coverage.xml --colors=always
- name: Upload coverage to Codecov.
if: matrix.php == '7.4'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml