Switch to roadrunner as the default runtime for API tests

This commit is contained in:
Alejandro Celaya
2024-02-15 23:37:10 +01:00
parent 720db64a03
commit d949b54ef4
6 changed files with 62 additions and 16 deletions

View File

@@ -14,6 +14,8 @@ jobs:
strategy:
matrix:
php-version: ['8.2', '8.3']
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # rr get-binary picks this env automatically
steps:
- uses: actions/checkout@v4
- name: Start postgres database server
@@ -27,6 +29,9 @@ jobs:
php-version: ${{ matrix.php-version }}
php-extensions: openswoole-22.1.2
extensions-cache-key: tests-extensions-${{ matrix.php-version }}-${{ inputs.test-group }}
- name: Download RoadRunner binary
if: ${{ inputs.test-group == 'api' }}
run: ./vendor/bin/rr get --no-interaction --no-config --location bin/ && chmod +x bin/rr
- run: composer test:${{ inputs.test-group }}:ci
- uses: actions/upload-artifact@v4
if: ${{ matrix.php-version == '8.2' }}

View File

@@ -50,28 +50,26 @@ jobs:
with:
test-group: cli
openswoole-api-tests:
roadrunner-api-tests:
uses: './.github/workflows/ci-tests.yml'
with:
test-group: api
roadrunner-api-tests:
openswoole-api-tests:
runs-on: ubuntu-22.04
strategy:
matrix:
php-version: ['8.2', '8.3']
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # rr get-binary picks this env automatically
steps:
- uses: actions/checkout@v4
- run: docker-compose -f docker-compose.yml -f docker-compose.ci.yml up -d shlink_db_postgres
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: openswoole-22.1.2
tools: composer
- run: composer install --no-interaction --prefer-dist --ignore-platform-req=ext-openswoole
- run: ./vendor/bin/rr get --no-interaction --no-config --location bin/ && chmod +x bin/rr
- run: composer test:api:rr
- run: composer install --no-interaction --prefer-dist
- run: composer test:api:openswoole
sqlite-db-tests:
uses: './.github/workflows/ci-db-tests.yml'