This repository has been archived on 2026-03-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
kb-web/.gitea/workflows/ci.yml
T
starmen1265 5a8cf2cbec
Test CI / 快速测试 (push) Failing after 1s
fix: 添加多个调试 echo 确认执行流程
2026-03-01 23:58:20 +08:00

50 lines
1.1 KiB
YAML

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
# 代码检查
lint:
name: 代码检查
runs-on: linux
container:
image: gitea-runner-php:latest
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 安装依赖
run: composer install --prefer-dist --no-progress --no-interaction
- name: PHP 语法检查
run: |
echo "📝 开始 PHP 语法检查..."
echo "🔍 正在检查所有 PHP 文件..."
for file in $(find . -name "*.php" -not -path "./vendor/*"); do
echo "检查: $file"
php -l "$file" || true
done
echo "✅ 文件检查完成"
# 单元测试
test:
name: 单元测试
runs-on: linux
container:
image: gitea-runner-php:latest
needs: lint
steps:
- name: 检出代码
uses: actions/checkout@v4
- name: 安装依赖
run: composer install --prefer-dist --no-progress --no-interaction
- name: 运行测试
run: composer test