From 5b74e1a6bdce3387059e8d60178accd150f5eb8f Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sun, 13 Feb 2022 22:08:38 +0800 Subject: [PATCH] wip --- .github/workflows/coveralls.yml | 2 +- .github/workflows/tests.yml | 48 +++++++++++++++++++++++++++++++-- composer.json | 4 +-- 3 files changed, 49 insertions(+), 5 deletions(-) diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index 6941f66..05272b6 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -15,7 +15,7 @@ jobs: php: - "8.0" dependencies: - - "locked" + - "highest" laravel: - "8.x" experimental: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 67b1e40..8d62162 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,6 +8,52 @@ on: jobs: tests: + runs-on: ${{ matrix.os }} + continue-on-error: ${{ matrix.experimental }} + strategy: + matrix: + os: + - "ubuntu-latest" + - "windows-latest" + php: + - "8.0" + - "8.1" + dependencies: + - "highest" + - "lowest" + laravel: + - "8.x" + - "9.x" + experimental: + - false + + name: Laravel ${{ matrix.laravel }} on PHP${{ matrix.php }}-${{ matrix.os }} (${{ matrix.dependencies }}) + + steps: + - name: Checkout code + uses: actions/checkout@v1 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, sqlite3, pdo_sqlite, bcmath, fileinfo + coverage: none + + - name: Install Laravel Framework ${{ matrix.laravel }} + run: | + composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update + + - name: Install dependencies + uses: "ramsey/composer-install@v1" + with: + dependency-versions: "${{ matrix.dependencies }}" + composer-options: "--prefer-dist --no-cache" + + - name: Execute tests + run: vendor/bin/phpunit + + tests-on-php-7: runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.experimental }} strategy: @@ -18,9 +64,7 @@ jobs: php: - "7.3" - "7.4" - - "8.0" dependencies: - - "locked" - "highest" - "lowest" laravel: diff --git a/composer.json b/composer.json index 17cbdbc..08fd21c 100644 --- a/composer.json +++ b/composer.json @@ -18,8 +18,8 @@ "php": "^7.3 || ^8.0" }, "require-dev": { - "orchestra/testbench": "^6.16", - "orchestra/canvas": "^6.1", + "orchestra/testbench": "^6.24 || ^7.0", + "orchestra/canvas": "^6.1 || ^7.0", "phpstan/phpstan": "^1.0.1" }, "minimum-stability": "dev"