-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from forkgroup/dev
Added PHPUnit of Github Actions
- Loading branch information
Showing
4 changed files
with
63 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: PHPUnit | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
ci: | ||
name: Test PHP ${{ matrix.php-version }} on Swoole ${{ matrix.swoole-version }} | ||
runs-on: "${{ matrix.os }}" | ||
env: | ||
SWOOLE_VERSION: ${{ matrix.swoole-version }} | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
php-version: [ '7.3', '7.4' ] | ||
swoole-version: [ '4.6.2', '4.5.11' ] | ||
max-parallel: 4 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: phpize | ||
ini-values: opcache.enable_cli=1, swoole.use_shortname='Off' | ||
coverage: none | ||
- name: Setup Swoole | ||
run: | | ||
wget https://github.com/swoole/swoole-src/archive/v${SWOOLE_VERSION}.tar.gz -O swoole.tar.gz | ||
mkdir -p swoole | ||
tar -xf swoole.tar.gz -C swoole --strip-components=1 | ||
rm swoole.tar.gz | ||
cd swoole | ||
phpize | ||
./configure --enable-openssl --enable-mysqlnd --enable-http2 | ||
make -j$(nproc) | ||
sudo make install | ||
sudo sh -c "echo extension=swoole > /etc/php/${{ matrix.php-version }}/cli/conf.d/swoole.ini" | ||
php --ri swoole | ||
- name: Setup Packages | ||
run: composer update -o --no-scripts | ||
- name: Run Test Cases | ||
run: | | ||
composer analyse | ||
composer test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters