Merge pull request #320 from gacela-project/feat/add-provider-bindings #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
name: Tests | |
jobs: | |
tests: | |
name: "PHP version ${{ matrix.php-version }}, deps. ${{ matrix.dependencies }} in ${{ matrix.operating-system }}" | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
fail-fast: false | |
matrix: | |
dependencies: [ "lowest", "locked", "highest" ] | |
php-version: [ "8.1", "8.2", "8.3" ] | |
operating-system: | |
- "ubuntu-latest" | |
# - "windows-latest" # TODO: Windows is not working in the CI at the moment for some reason | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
coverage: none | |
tools: composer | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v3.3.1 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" | |
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}-" | |
- name: "Install lowest dependencies" | |
if: ${{ matrix.dependencies == 'lowest' }} | |
run: "composer update --prefer-lowest --no-interaction --no-progress" | |
- name: "Install locked dependencies" | |
if: ${{ matrix.dependencies == 'locked' }} | |
run: "composer install --no-interaction --no-progress" | |
- name: "Install highest dependencies" | |
if: ${{ matrix.dependencies == 'highest' }} | |
run: "composer update --no-interaction --no-progress" | |
- name: Run unit tests | |
run: vendor/bin/phpunit --testsuite unit | |
- name: Run integration tests | |
run: vendor/bin/phpunit --testsuite integration | |
- name: Run feature tests | |
run: vendor/bin/phpunit --testsuite feature | |
- name: Run PHPBench | |
run: vendor/bin/phpbench run --iterations=3 --warmup=1 --report=aggregate |