forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (73 loc) · 2.85 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
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 }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 7.3
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
coverage: none
- php: 7.4
extensions: apc, curl, dom, imagick, intl, mbstring, mcrypt, memcached
coverage: xdebug
- php: 8.0
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
coverage: none
- php: 8.1
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
coverage: none
- php: 8.2
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
coverage: none
- php: 8.3
extensions: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached
coverage: none
os: ubuntu-latest
- php: 8.4
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@v4
- 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.
if: matrix.php != '8.4'
run: composer update $DEFAULT_COMPOSER_FLAGS
- name: Install dependencies with PHP 8.4.
if: matrix.php == '8.4'
run: composer update $DEFAULT_COMPOSER_FLAGS --ignore-platform-reqs
- 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: Run tests with PHPUnit.
if: matrix.php != '7.4'
run: vendor/bin/phpunit --verbose --exclude-group $PHPUNIT_EXCLUDE_GROUP --colors=always
- name: Upload coverage to Codecov.
if: matrix.php == '7.4'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml