From 4fcee4ac97d8dd949950258da172f7a3a9e90758 Mon Sep 17 00:00:00 2001 From: Rodolfo Berrios Date: Tue, 12 Jan 2021 14:04:14 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 60 +++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f1ee12d..bcdfeba 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,48 +1,46 @@ -name: CI +name: "testing" -on: [push] +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] jobs: - build: - runs-on: ${{ matrix.operating-system }} + tests: + name: Tests + runs-on: ubuntu-latest + strategy: matrix: - operating-system: [ubuntu-latest] - php-versions: ["7.2", "7.3", "7.4", 8.0"] - env: - tools: composer - name: PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-system }} + php: + - 7.2 + - 7.3 + - 7.4 + composer-args: [ "" ] + include: + - php: 8.0 + composer-args: --ignore-platform-reqs + fail-fast: false + steps: - name: Checkout uses: actions/checkout@v2 - - name: Setup PHP + - name: Install PHP uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php-versions }} - tools: ${{ env.tools }} - env: - fail-fast: true - - - name: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: Validate composer - run: composer validate - - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" + php-version: ${{ matrix.php }} - - name: Cache dependencies + - name: Cache PHP dependencies uses: actions/cache@v2 with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- + path: vendor + key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer- - name: Install dependencies - run: composer install + run: composer install --prefer-dist --no-progress --no-suggest ${{ matrix.composer-args }} - - name: Run tests - run: composer test + - name: Tests + run: composer test \ No newline at end of file