Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Commit 1c1ca57

Browse files
authored
CI supports (#42)
* add tests * add tests * add workflow * install swoole * install swoole * install swoole * install swoole * install swoole * install swoole * install swoole * install swoole * install swoole * install swoole * install swoole * install swoole * install swoole * install swoole * install swoole * build * install pgsql * build * sync swoole master * sync swoole master * fix tests * fix tests[2] * fix tests[3] * fix tests[4] * fix tests[5] * fix tests[6] * build * build 2 * build 4 * fix tests * fix tests[2] * fix tests[4]
1 parent a65bf49 commit 1c1ca57

11 files changed

+2415
-30
lines changed

.github/install-swoole.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
wget https://github.com/swoole/swoole-src/archive/master.zip &&
2+
unzip master.zip &&
3+
cd swoole-src-master &&
4+
phpize && ./configure &&
5+
make -j$(sysctl -n hw.ncpu) &&
6+
sudo make install &&
7+
php --ini &&
8+
php -v &&
9+
sudo sh -c "echo 'extension=swoole.so' >> /etc/php/7.4/cli/conf.d/30-swoole.ini" &&
10+
php -m &&
11+
cd - &&
12+
rm -rf swoole-src-master &&
13+
pwd
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: ext-swoole_postgresql
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
container-job:
7+
runs-on: ubuntu-latest
8+
container: phpswoole/swoole:latest-dev
9+
# services:
10+
# postgres:
11+
# image: postgres
12+
# env:
13+
# POSTGRES_PASSWORD: postgres
14+
# ports:
15+
# - 5432:5432
16+
steps:
17+
- uses: actions/checkout@v1
18+
- name: install swoole
19+
run:
20+
# wget https://github.com/swoole/swoole-src/archive/master.zip &&
21+
# unzip master.zip &&
22+
# cd swoole-src-master &&
23+
# phpize && ./configure &&
24+
# make -j$(sysctl -n hw.ncpu) &&
25+
# sudo make install &&
26+
# php --ini &&
27+
# php -v &&
28+
# sudo sh -c "echo 'extension=swoole.so' >> /etc/php/7.4/cli/conf.d/30-swoole.ini" &&
29+
php -m &&
30+
# cd - &&
31+
# rm -rf swoole-src-master &&
32+
pwd
33+
- name: phpize
34+
run: phpize
35+
- name: build
36+
run: sudo apt install -y libpq-dev &&
37+
./configure &&
38+
make clean &&
39+
make -j$(sysctl -n hw.ncpu)
40+
- name: install swoole_postgresql
41+
run: sudo make install &&
42+
sudo rm /etc/php/7.4/cli/conf.d/20-xdebug.ini &&
43+
sudo sh -c "echo 'extension=swoole_postgresql.so' >> /etc/php/7.4/cli/conf.d/30-swoole_postgresql.ini"
44+
- name: composer
45+
run: composer update
46+
- name: tests
47+
run: php vendor/bin/phpunit
48+
env:
49+
POSTGRES_HOST: postgres
50+
POSTGRES_PORT: 5432

.gitignore

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ examples/c_module/.project
6868
/tmp-php.ini
6969
.settings/
7070
tests/.idea
71-
/tests/**/*.log
72-
/tests/**/*.sh
73-
/tests/**/*.diff
74-
/tests/**/*.out
75-
/tests/**/*.exp
76-
/tests/**/*.mem
77-
/tests/**/*.php
7871
/core-tests/server/*.log
7972
cmake-build-debug/
8073
*.cbp
@@ -95,3 +88,5 @@ cmake-build-debug/
9588
/examples/wrapper/Makefile
9689
/examples/wrapper/server
9790
/examples/wrapper/cmake_install.cmake
91+
/vendor
92+
/.phpunit.result.cache

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"require": {
3+
"phpunit/phpunit": "^9.3",
4+
"ext-swoole": ">=4.5",
5+
"ext-swoole_postgresql": ">=4.5"
6+
}
7+
}

0 commit comments

Comments
 (0)