.github/workflows/spawn_linux.yml
# GitHub Action for PHP with extensions
name: Linux
on: [push, pull_request]
jobs:
linux:
name: Linux CI
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
php: ['7.4']
steps:
- name: Checkout
uses: actions/checkout@v2
- 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: ${{ matrix.php }}
extensions: mbstring, simplexml, dom, :opcache
coverage: none
env:
PHPTS: ts # specify ts or nts
- name: Build and install PHP-UV extension
run: |
sudo pecl channel-update pecl.php.net
sudo pecl install uv-beta
- 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() }}
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml # optional