Files
a620906209 efb7d1b773 ci(github): 新增 GitHub 鏡像專用的測試 workflow
Gitea 讀 .gitea/workflows,GitHub 讀 .github/workflows,兩者互不影響。
GitHub 版改用 ubuntu-latest + setup-php(PHP 8.2 對齊正式環境);
不含 deploy,部署只走 Gitea。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 23:06:53 +08:00

38 lines
1001 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Run Tests
# 只供 GitHub 鏡像使用;Gitea 有 .gitea/workflows 時不會讀取本目錄。
# 部署只走 Gitea 的 deploy.yml,這裡刻意不放 deploy。
on:
push:
branches:
- master
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# 版本對齊正式環境 Dockerfile 的 php:8.2-fpm(Gitea runner 受限於 Alpine 只能用 php84)
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, dom, fileinfo, gd, pdo_sqlite, sqlite3, xml, simplexml, curl, openssl
coverage: none
- name: Copy .env
run: cp .env.example .env
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Generate application key
run: php artisan key:generate
- name: Run tests
run: php artisan test