symplely/coroutine

View on GitHub
.github/workflows/coroutine_windows.yml

Summary

Maintainability
Test Coverage
# GitHub Action for PHP with extensions
name: Windows

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  windows:
    name: Windows CI
    runs-on: windows-2019
    continue-on-error: true
    strategy:
      fail-fast: false
    steps:
    - name: Checkout
      uses: actions/checkout@v3
    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: '7.4'
        extensions: mbstring, simplexml, curl, dom, sockets, fileinfo, openssl, xdebug
        ini-values: extension=uv
        coverage: xdebug
      env:
        PHPTS: ts # specify ts or nts
    - name: Download and install PHP-UV
      shell: powershell
      run: |
        cd C:\tools\php
        Invoke-WebRequest "https://windows.php.net/downloads/pecl/releases/uv/0.2.4/php_uv-0.2.4-7.4-ts-vc15-x64.zip" -OutFile "php_uv-0.2.4-7.4-ts-vc15-x64.zip"
        7z x -y php_uv-0.2.4-7.4-ts-vc15-x64.zip libuv.dll php_uv.dll
        copy php_uv.dll ext\php_uv.dll
        del php_uv.dll
        del php_uv-0.2.4-7.4-ts-vc15-x64.zip
    - 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: ./clover.xml # optional

  windows_php81:
    name: Windows CI - no libuv
    runs-on: windows-latest
    continue-on-error: true
    strategy:
      fail-fast: false
      matrix:
        operating-system: [windows-latest]
        php: ['8.1']
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: '8.1'
        tools: pecl
        extensions: mbstring, simplexml, curl, dom, sockets, fileinfo, openssl
      env:
        PHPTS: ts # specify ts or nts
    - 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: ./clover.xml # optional