Skip to content

Commit

Permalink
up: add github action for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Apr 30, 2021
1 parent 000e941 commit 0c92ee3
Show file tree
Hide file tree
Showing 28 changed files with 1,460 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
include:
- os: 'ubuntu-latest'
php: '7.1'
swoole-versions: '-4.5.10'
swoole-versions: '-4.5.24'

steps:
- uses: actions/checkout@v2
Expand All @@ -54,7 +54,7 @@ jobs:

- name: Display swoole extensions
timeout-minutes: 1
run: php --ri swoole && php --re swoole | grep class
run: php --ri swoole
# sudo pecl install -f swoole
# echo 'no' | pecl install -f redis
# sudo pecl update-channels && pecl install -f msgpack && pecl install -f igbinary && php -m
Expand Down
54 changes: 54 additions & 0 deletions src/annotation/.github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# Github actions for swoft component tests
# https://github.com/marketplace?type=actions
#
name: Unit-tests

on: [push, pull_request]

# usage refer https://github.com/shivammathur/setup-php
jobs:
test:
name: Test on php ${{ matrix.php}} and ${{ matrix.os }} OS
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
SWOFT_DEBUG: 0
strategy:
fail-fast: true # fast fail
matrix:
php: [7.2, 7.3, 7.4, 8.0]
os: [ubuntu-latest] # , macOS-latest, windows-latest
swoole-versions: [''] # latest
include:
- os: 'ubuntu-latest'
php: '7.1'
swoole-versions: '-4.5.24'

steps:
- uses: actions/checkout@v2
# usage refer https://github.com/shivammathur/setup-php
- name: Setup PHP
timeout-minutes: 5
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php}}
extensions: mbstring, dom, fileinfo, mysql, openssl, redis, swoole${{ matrix.swoole-versions }} #optional, setup extensions
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
coverage: none #optional, setup coverage driver: xdebug, none

- name: Display swoole extensions
timeout-minutes: 1
run: php --ri swoole
# sudo pecl install -f swoole
# echo 'no' | pecl install -f redis
# sudo pecl update-channels && pecl install -f msgpack && pecl install -f igbinary && php -m

- name: Install dependencies
run: composer install --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run test
54 changes: 54 additions & 0 deletions src/aop/.github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# Github actions for swoft component tests
# https://github.com/marketplace?type=actions
#
name: Unit-tests

on: [push, pull_request]

# usage refer https://github.com/shivammathur/setup-php
jobs:
test:
name: Test on php ${{ matrix.php}} and ${{ matrix.os }} OS
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
SWOFT_DEBUG: 0
strategy:
fail-fast: true # fast fail
matrix:
php: [7.2, 7.3, 7.4, 8.0]
os: [ubuntu-latest] # , macOS-latest, windows-latest
swoole-versions: [''] # latest
include:
- os: 'ubuntu-latest'
php: '7.1'
swoole-versions: '-4.5.24'

steps:
- uses: actions/checkout@v2
# usage refer https://github.com/shivammathur/setup-php
- name: Setup PHP
timeout-minutes: 5
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php}}
extensions: mbstring, dom, fileinfo, mysql, openssl, redis, swoole${{ matrix.swoole-versions }} #optional, setup extensions
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
coverage: none #optional, setup coverage driver: xdebug, none

- name: Display swoole extensions
timeout-minutes: 1
run: php --ri swoole
# sudo pecl install -f swoole
# echo 'no' | pecl install -f redis
# sudo pecl update-channels && pecl install -f msgpack && pecl install -f igbinary && php -m

- name: Install dependencies
run: composer install --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run test
54 changes: 54 additions & 0 deletions src/bean/.github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# Github actions for swoft component tests
# https://github.com/marketplace?type=actions
#
name: Unit-tests

on: [push, pull_request]

# usage refer https://github.com/shivammathur/setup-php
jobs:
test:
name: Test on php ${{ matrix.php}} and ${{ matrix.os }} OS
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
SWOFT_DEBUG: 0
strategy:
fail-fast: true # fast fail
matrix:
php: [7.2, 7.3, 7.4, 8.0]
os: [ubuntu-latest] # , macOS-latest, windows-latest
swoole-versions: [''] # latest
include:
- os: 'ubuntu-latest'
php: '7.1'
swoole-versions: '-4.5.24'

steps:
- uses: actions/checkout@v2
# usage refer https://github.com/shivammathur/setup-php
- name: Setup PHP
timeout-minutes: 5
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php}}
extensions: mbstring, dom, fileinfo, mysql, openssl, redis, swoole${{ matrix.swoole-versions }} #optional, setup extensions
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
coverage: none #optional, setup coverage driver: xdebug, none

- name: Display swoole extensions
timeout-minutes: 1
run: php --ri swoole
# sudo pecl install -f swoole
# echo 'no' | pecl install -f redis
# sudo pecl update-channels && pecl install -f msgpack && pecl install -f igbinary && php -m

- name: Install dependencies
run: composer install --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run test
54 changes: 54 additions & 0 deletions src/config/.github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# Github actions for swoft component tests
# https://github.com/marketplace?type=actions
#
name: Unit-tests

on: [push, pull_request]

# usage refer https://github.com/shivammathur/setup-php
jobs:
test:
name: Test on php ${{ matrix.php}} and ${{ matrix.os }} OS
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
SWOFT_DEBUG: 0
strategy:
fail-fast: true # fast fail
matrix:
php: [7.2, 7.3, 7.4, 8.0]
os: [ubuntu-latest] # , macOS-latest, windows-latest
swoole-versions: [''] # latest
include:
- os: 'ubuntu-latest'
php: '7.1'
swoole-versions: '-4.5.24'

steps:
- uses: actions/checkout@v2
# usage refer https://github.com/shivammathur/setup-php
- name: Setup PHP
timeout-minutes: 5
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php}}
extensions: mbstring, dom, fileinfo, mysql, openssl, redis, swoole${{ matrix.swoole-versions }} #optional, setup extensions
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
coverage: none #optional, setup coverage driver: xdebug, none

- name: Display swoole extensions
timeout-minutes: 1
run: php --ri swoole
# sudo pecl install -f swoole
# echo 'no' | pecl install -f redis
# sudo pecl update-channels && pecl install -f msgpack && pecl install -f igbinary && php -m

- name: Install dependencies
run: composer install --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run test
54 changes: 54 additions & 0 deletions src/connection-pool/.github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# Github actions for swoft component tests
# https://github.com/marketplace?type=actions
#
name: Unit-tests

on: [push, pull_request]

# usage refer https://github.com/shivammathur/setup-php
jobs:
test:
name: Test on php ${{ matrix.php}} and ${{ matrix.os }} OS
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
SWOFT_DEBUG: 0
strategy:
fail-fast: true # fast fail
matrix:
php: [7.2, 7.3, 7.4, 8.0]
os: [ubuntu-latest] # , macOS-latest, windows-latest
swoole-versions: [''] # latest
include:
- os: 'ubuntu-latest'
php: '7.1'
swoole-versions: '-4.5.24'

steps:
- uses: actions/checkout@v2
# usage refer https://github.com/shivammathur/setup-php
- name: Setup PHP
timeout-minutes: 5
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php}}
extensions: mbstring, dom, fileinfo, mysql, openssl, redis, swoole${{ matrix.swoole-versions }} #optional, setup extensions
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
coverage: none #optional, setup coverage driver: xdebug, none

- name: Display swoole extensions
timeout-minutes: 1
run: php --ri swoole
# sudo pecl install -f swoole
# echo 'no' | pecl install -f redis
# sudo pecl update-channels && pecl install -f msgpack && pecl install -f igbinary && php -m

- name: Install dependencies
run: composer install --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run test
54 changes: 54 additions & 0 deletions src/console/.github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# Github actions for swoft component tests
# https://github.com/marketplace?type=actions
#
name: Unit-tests

on: [push, pull_request]

# usage refer https://github.com/shivammathur/setup-php
jobs:
test:
name: Test on php ${{ matrix.php}} and ${{ matrix.os }} OS
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
SWOFT_DEBUG: 0
strategy:
fail-fast: true # fast fail
matrix:
php: [7.2, 7.3, 7.4, 8.0]
os: [ubuntu-latest] # , macOS-latest, windows-latest
swoole-versions: [''] # latest
include:
- os: 'ubuntu-latest'
php: '7.1'
swoole-versions: '-4.5.24'

steps:
- uses: actions/checkout@v2
# usage refer https://github.com/shivammathur/setup-php
- name: Setup PHP
timeout-minutes: 5
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php}}
extensions: mbstring, dom, fileinfo, mysql, openssl, redis, swoole${{ matrix.swoole-versions }} #optional, setup extensions
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration
coverage: none #optional, setup coverage driver: xdebug, none

- name: Display swoole extensions
timeout-minutes: 1
run: php --ri swoole
# sudo pecl install -f swoole
# echo 'no' | pecl install -f redis
# sudo pecl update-channels && pecl install -f msgpack && pecl install -f igbinary && php -m

- name: Install dependencies
run: composer install --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

- name: Run test suite
run: composer run test
Loading

0 comments on commit 0c92ee3

Please sign in to comment.