aebce80152
Run Tests / test (pull_request) Failing after 42s
ubuntu-latest 觸發 container 模式,導致 mkdirat var/run: file exists 錯誤。 改成 self-hosted 與 deploy.yml 一致,直接跑在 host 模式。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
704 B
YAML
35 lines
704 B
YAML
name: Run Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.2'
|
|
extensions: mbstring, dom, fileinfo, gd, pdo_sqlite, sqlite3
|
|
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
|