Update zircote/swagger-php requirement from 4.8.0 to 4.9.3 #551
Workflow file for this run
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
name: MineAdmin Unit and Ci Test | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 2 * * *' | |
jobs: | |
tests: | |
name: Test on PHP${{ matrix.php-version }} Swoole-${{ matrix.sw-version }} | |
runs-on: "${{ matrix.os }}" | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
php-version: [ '8.3', '8.2', '8.1' ] | |
sw-version: [ 'v5.0.3', 'v5.1.2', 'master' ] | |
exclude: | |
- php-version: '8.3' | |
sw-version: 'v5.0.3' | |
max-parallel: 20 | |
fail-fast: false | |
env: | |
SW_VERSION: ${{ matrix.sw-version }} | |
MYSQL_VERSION: '8.0' | |
PGSQL_VERSION: '14' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Upgrade | |
run: | | |
sudo apt-get clean | |
sudo apt-get update | |
sudo apt-get upgrade -f | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: phpize | |
extensions: redis, pdo, pdo_mysql,sqlsrv,pdo_sqlsrv,pdo_odbc,bcmath | |
ini-values: opcache.enable_cli=0 | |
env: | |
PDO_ODBC_OPTS: --prefix=/usr/local/unixODBC --includedir=/usr/local/include --libdir=/usr/local/lib -bindir=/usr/local/bin --sysconfdir=/usr/local/etc | |
- name: Setup ODBC | |
if: matrix.sw-version != 'v5.0.3' | |
run: | | |
if ! [[ "18.04 20.04 22.04 23.04" == *"$(lsb_release -rs)"* ]]; | |
then | |
echo "Ubuntu $(lsb_release -rs) is not currently supported."; | |
exit; | |
fi | |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc | |
curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list | |
sudo apt-get update | |
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 | |
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools18 | |
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc | |
source ~/.bashrc | |
sudo apt-get install -y unixodbc-dev | |
odbcinst -j | |
- name: Setup Swoole | |
run: | | |
sudo apt-get install libcurl4-openssl-dev libc-ares-dev libpq-dev | |
wget https://github.com/swoole/swoole-src/archive/${SW_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-swoole-curl --with-swoole-odbc=unixODBC,/usr --enable-cares --enable-swoole-pgsql --enable-brotli | |
make -j$(nproc) | |
sudo make install | |
sudo sh -c "echo extension=swoole > /etc/php/${{ matrix.php-version }}/cli/conf.d/swoole.ini" | |
sudo sh -c "echo swoole.use_shortname='Off' >> /etc/php/${{ matrix.php-version }}/cli/conf.d/swoole.ini" | |
php --ri swoole | |
- name: Setup Packages | |
run: ./.travis/requirement.install.sh | |
- name: Run PHPStan | |
run: ./.travis/run.check.sh | |
- name: Setup Services | |
run: ./.travis/setup.services.sh | |
- name: Setup Mysql | |
run: export TRAVIS_BUILD_DIR=$(pwd) && bash ./.travis/setup.mysql.sh | |
- name: Setup PostgreSQL | |
run: export TRAVIS_BUILD_DIR=$(pwd) && bash ./.travis/setup.pgsql.sh | |
- name: Setup MsSql | |
run: export TRAVIS_BUILD_DIR=$(pwd) && bash ./.travis/setup.mssql.sh | |
- name: Run Scripts Before Test | |
run: cp .travis/.env.example .env | |
- name: Print PHP Environments | |
run: | | |
php -i | |
php -m | |
- name: Run Mysql Test Cases | |
env: | |
DB_DRIVER: mysql | |
DB_HOST: 127.0.0.1 | |
DB_DATABASE: mineadmin | |
run: ./.travis/run.test.sh | |
- name: Run PgSql Test Cases | |
env: | |
DB_DRIVER: pgsql | |
DB_HOST: 127.0.0.1 | |
DB_PORT: 5432 | |
DB_USERNAME: postgres | |
DB_PASSWORD: postgres | |
DB_CHARSET: utf8 | |
DB_DATABASE: mineadmin | |
run: ./.travis/run.test.sh | |
# 因为 mssql 依赖现在有问题,暂时未修复。等修复后再开启 | |
# - name: Run MsSql Test Cases | |
# if: matrix.sw-version != 'v5.0.3' | |
# env: | |
# DB_DRIVER: sqlsrv | |
# DB_HOST: mssql | |
# DB_PORT: 1433 | |
# DB_USERNAME: SA | |
# DB_PASSWORD: mineadmin123,./ | |
# DB_CHARSET: utf8 | |
# DB_DATABASE: mineadmin | |
# ODBC_ENABLE: true | |
# ODBC_DSN: "DRIVER={ODBC Driver 18 for SQL Server};SERVER=127.0.0.1,1433;TrustServerCertificate=yes;database=mineadmin" | |
# run: | | |
# composer require hyperf/database-sqlserver-incubator:dev-main | |
# ./.travis/run.test.sh |