forked from nikic/ditaio
-
Notifications
You must be signed in to change notification settings - Fork 5
64 lines (61 loc) · 2.08 KB
/
coroutine_linux.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
# GitHub Action for PHP with extensions
name: Linux
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux:
name: Linux CI
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install libuv and PHP build tools
run: |
sudo apt update
sudo apt-get install libuv1-dev php-pear
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: '7.4'
extensions: mbstring, simplexml, dom, xdebug
coverage: xdebug
- name: Build and install PHP-UV extension
run: |
sudo pecl channel-update pecl.php.net
sudo pecl install uv-beta
- name: Add uv.so to php.ini
run: sudo echo "extension=uv.so" >> "$(php -r 'echo php_ini_loaded_file();')"
- name: Install dependencies
run: composer install
- name: Test with phpunit
run: vendor/bin/phpunit -d zend.enable_gc=0 --coverage-clover=coverage/phpunit/clover.xml
- name: Submit code coverage
if: ${{ success() }} || ${{ failure() }}
run: bash <(curl -s https://codecov.io/bash)
linux_php81:
name: Linux CI - no libuv
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: '8.1'
extensions: mbstring, simplexml, dom
- name: Install dependencies
run: composer install
- name: Test with phpunit
run: vendor/bin/phpunit -d zend.enable_gc=0 --coverage-clover=coverage/phpunit/clover.xml
- name: Submit code coverage
if: ${{ success() }} || ${{ failure() }}
run: bash <(curl -s https://codecov.io/bash)