From efc05e0c5af3920342a51a010aebc9d0f814ebc7 Mon Sep 17 00:00:00 2001 From: XiaoLFeng Date: Thu, 29 Jun 2023 22:00:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0Unit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/laravel.yaml | 47 +++++++++++++++++++++++++++++++++++ phpunit.xml | 18 +++++++------- 2 files changed, 56 insertions(+), 9 deletions(-) create mode 100644 .gitea/workflows/laravel.yaml diff --git a/.gitea/workflows/laravel.yaml b/.gitea/workflows/laravel.yaml new file mode 100644 index 0000000..1640e63 --- /dev/null +++ b/.gitea/workflows/laravel.yaml @@ -0,0 +1,47 @@ +name: Tests + +on: + push: + branches: + - master + - '*.x' + pull_request: + schedule: + - cron: '0 0 * * *' + +permissions: + contents: read + +jobs: + tests: + runs-on: centos + + strategy: + fail-fast: true + matrix: + php: [8.1, 8.2] + + name: PHP + + steps: + - name: 检查代码 + uses: actions/checkout@v3 + + - name: 配置PHP + uses: XiaoLFeng/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: 安装PHP Composer依赖 + run: composer install --prefer-dist --no-interaction --no-progress + + - name: 复制配置文件 + run: cp .env.example .env + + - name: 生成应用程序密钥 + run: php artisan key:generate + +# - name: Execute tests +# run: /phpunit diff --git a/phpunit.xml b/phpunit.xml index e4386c4..531beb9 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -24,14 +24,14 @@ - - - - - - - - - + + + + + + + + +