From fca8f278f5106db00683108eeea28ca4a9d30564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AD=B1=E9=94=8Bxiao=5Flfeng?= Date: Thu, 29 Jun 2023 00:46:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20.gitea/workflows/Laravel.y?= =?UTF-8?q?aml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/Laravel.yaml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) 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..33ce8b0 --- /dev/null +++ b/.gitea/workflows/Laravel.yaml @@ -0,0 +1,48 @@ +name: Tests + +on: + push: + branches: + - feature + - master + - '*.x' + pull_request: + schedule: + - cron: '0 0 * * *' + +permissions: + contents: read + +jobs: + tests: + runs-on: ubuntu-latest + + strategy: + fail-fast: true + matrix: + php: [8.1, 8.2] + + name: PHP ${{ matrix.php }} + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install Composer dependencies + run: composer install --prefer-dist --no-interaction --no-progress + + - name: Copy environment file + run: cp .env.example .env + + - name: Generate app key + run: php artisan key:generate + + - name: Execute tests + run: vendor/bin/phpunit \ No newline at end of file