3b73be4051
Run Tests / test (pull_request) Successful in 39s
aws/aws-sdk-php(因 league/flysystem-aws-s3-v3 新增)要求 ext-simplexml, CI 的 Alpine runner 用 apk 逐一裝擴充套件,之前沒裝這個 package 導致 composer install 失敗。正式環境的 Dockerfile 是 Debian 版 php:8.2-fpm, simplexml 內建就有,不受影響,只有 CI 這邊要補。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011LpcY9b7y9x4fusHBTXciQ
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
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
|
|
run: |
|
|
apk add --no-cache \
|
|
php84 php84-phar php84-mbstring php84-dom php84-fileinfo php84-gd \
|
|
php84-pdo php84-pdo_sqlite php84-sqlite3 php84-tokenizer \
|
|
php84-xml php84-xmlwriter php84-simplexml php84-ctype php84-curl php84-openssl \
|
|
php84-json php84-session php84-iconv \
|
|
curl unzip
|
|
ln -sf /usr/bin/php84 /usr/local/bin/php
|
|
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer --quiet
|
|
|
|
- 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
|