From fc64609d365591782b97b394d53cf0e152605fb8 Mon Sep 17 00:00:00 2001 From: Oliver Kaufmann Date: Fri, 11 Sep 2020 14:28:25 +0200 Subject: [PATCH] format run-tests.yml and remove duplicate version constraint --- .github/workflows/run-tests.yml | 77 +++++++++++++++++---------------- composer.json | 2 +- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 880442b..b7cf42e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -3,45 +3,48 @@ name: run-tests on: [push, pull_request] jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - php: [7.4, 7.3, 7.2] - laravel: [8.*, 7.*, 6.*] - dependency-version: [prefer-lowest, prefer-stable] - include: - - laravel: 8.* - testbench: 6.* - - laravel: 7.* - testbench: 5.* - - laravel: 6.* - testbench: 4.* + test: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + php: [7.4, 7.3, 7.2] + laravel: [8.*, 7.*, 6.*] + dependency-version: [prefer-lowest, prefer-stable] + include: + - laravel: 8.* + testbench: 6.* + - laravel: 7.* + testbench: 5.* + - laravel: 6.* + testbench: 4.* + exclude: + - laravel: 8.* + php: 7.2 - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} - steps: - - name: Checkout code - uses: actions/checkout@v1 + steps: + - name: Checkout code + uses: actions/checkout@v1 - - name: Cache dependencies - uses: actions/cache@v1 - with: - path: ~/.composer/cache/files - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + - name: Cache dependencies + uses: actions/cache@v1 + with: + path: ~/.composer/cache/files + key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick - coverage: none + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick + coverage: none - - name: Install dependencies - run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest - - name: Execute tests - run: vendor/bin/phpunit \ No newline at end of file + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest + - name: Execute tests + run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 4feba32..9ebf4d2 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "laravel/framework": "^6.0|^7.0|^8.0" }, "require-dev": { - "mockery/mockery": "^1.3.1|^1.3.1", + "mockery/mockery": "^1.3.1", "illuminate/database": "^6.0|^7.0|^8.0", "orchestra/testbench": "^4.0|^5.0|^6.0", "doctrine/dbal": "^2.10"