[RoadRunner] Add support for RoadRunner 2023 and 2024 #366
Workflow file for this run
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
name: CI | |
on: | |
pull_request: | |
paths: | |
- src/** | |
jobs: | |
matrix: | |
name: Find packages | |
runs-on: Ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Fetch master from where the PR started | |
run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
- name: Find packages | |
id: find-packages | |
run: echo "::set-output name=list::$(git diff --name-only origin/${{ github.base_ref }} HEAD | grep src/ | cut -d / -f 2 | sort | uniq | jq -R -s -c 'split("\n")[:-1]')" | |
outputs: | |
# Make the outputs accessible outside this job | |
list: ${{ steps.find-packages.outputs.list }} | |
build: | |
needs: matrix | |
name: Test | |
runs-on: Ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
package: ${{ fromJson(needs.matrix.outputs.list) }} | |
php: [ '8.1', '8.2', '8.3' ] | |
strategy: [ 'highest', 'lowest' ] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: none | |
extensions: swoole | |
- name: Download dependencies | |
uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: ${{ matrix.strategy }} | |
composer-options: --working-dir=src/${{ matrix.package }} --no-interaction --prefer-dist --optimize-autoloader | |
- name: Run tests | |
run: | | |
cd src/${{ matrix.package }} | |
./vendor/bin/phpunit |