mkm b21bfe7657 feat(log): 添加操作日志记录功能
- 新增 ChangeLogLogic 和 ChangeLog 模型用于记录数据变更日志
- 引入 third-party 包 chance-fyi/operation-log 实现日志记录功能
- 在 composer.json 和 config/thinkorm.php 中添加相关配置
2025-01-02 11:58:30 +08:00

57 lines
1.3 KiB
YAML

name: PHPUnit
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php: [ 8.0, 8.1, 8.2 ]
swoole: [ '', swoole ]
name: PHP ${{ matrix.php }} ${{ matrix.swoole }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Start MySQL
run: docker compose up -d mysql mysql1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, pdo_mysql, ${{ matrix.swoole }}
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
- name: Composer install
run: composer install
- name: Static analysis
run: composer analyse
- name: Wait for MySQL
run: |
while ! docker compose exec mysql mysql --user=root --password=root -e "SELECT 1" >/dev/null 2>&1 || ! docker compose exec mysql1 mysql --user=root --password=root -e "SELECT 1" >/dev/null 2>&1; do
sleep 1
done
- name: Run tests
env:
MYSQL_HOST: 127.0.0.1
MYSQL_PORT: 33060
MYSQL1_PORT: 33061
run: composer test
- name: Close MySQL
run: docker compose down