Skip to content

Commit

Permalink
Split up tests and banchmark into two different jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Apr 17, 2021
1 parent 4c1527e commit ec7e27a
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,41 @@ jobs:
- name: Test
run: |
./vendor/bin/phpunit --coverage-text
benchmark:
name: Run Tests and Code Quality on PHP ${{ matrix.php }}
runs-on: ubuntu-latest
needs:
- supported-versions-matrix
strategy:
fail-fast: false
matrix:
composer: [install, "update", "update --prefer-lowest"]
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, extensions and composer with shivammathur/setup-php
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug, pcov
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Get composer action hash
id: composer-action-hash
run: printf "::set-output name=hash::%s" $(echo -n "${{ matrix.composer }}" | sha512sum)
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ steps.composer-action-hash.outputs.hash }}
- name: Install Composer dependencies
run: |
composer config --unset platform.php
composer update --lock
composer ${{ matrix.composer }} --no-progress --no-interaction --no-suggest --optimize-autoloader --ansi
- name: Test
run: |
php benchmark/memory.php

0 comments on commit ec7e27a

Please sign in to comment.