build(deps): bump actions/create-github-app-token from 2.2.1 to 3.0.0 #1820
Workflow file for this run
This file contains hidden or 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: | |
| push: | |
| branches: | |
| - master | |
| - release/** | |
| permissions: | |
| contents: read | |
| env: | |
| FRANKENPHP_VERSION: v1.11.2 | |
| ROADRUNNER_VERSION: v2025.1.7 | |
| jobs: | |
| tests: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| SYMFONY_REQUIRE: ${{ matrix.symfony-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: | |
| - '7.2' | |
| - '7.3' | |
| - '7.4' | |
| - '8.0' | |
| - '8.1' | |
| - '8.2' | |
| - '8.3' | |
| - '8.4' | |
| symfony-version: | |
| - 4.4.* | |
| - 5.* | |
| - 6.* | |
| - 7.* | |
| - 8.* | |
| dependencies: | |
| - highest | |
| exclude: | |
| - php: '7.2' | |
| symfony-version: 6.* | |
| - php: '7.3' | |
| symfony-version: 6.* | |
| - php: '7.4' | |
| symfony-version: 6.* | |
| - php: '7.2' | |
| symfony-version: 7.* | |
| - php: '7.3' | |
| symfony-version: 7.* | |
| - php: '7.4' | |
| symfony-version: 7.* | |
| - php: '8.0' | |
| symfony-version: 7.* | |
| - php: '8.1' | |
| symfony-version: 7.* | |
| - php: '8.4' | |
| symfony-version: 4.4.* | |
| - php: '7.2' | |
| symfony-version: 8.* | |
| - php: '7.3' | |
| symfony-version: 8.* | |
| - php: '7.4' | |
| symfony-version: 8.* | |
| - php: '8.0' | |
| symfony-version: 8.* | |
| - php: '8.1' | |
| symfony-version: 8.* | |
| - php: '8.2' | |
| symfony-version: 8.* | |
| - php: '8.3' | |
| symfony-version: 8.* | |
| include: | |
| - php: '7.2' | |
| symfony-version: 4.4.* | |
| dependencies: lowest | |
| - php: '7.2' | |
| symfony-version: 5.* | |
| dependencies: lowest | |
| - php: '8.0' | |
| symfony-version: 6.* | |
| dependencies: lowest | |
| - php: '8.2' | |
| symfony-version: 7.* | |
| dependencies: lowest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| fetch-depth: 2 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@728c6c6b8cf02c2e48117716a91ee48313958a19 # v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: pcov | |
| tools: flex | |
| - name: Setup Problem Matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| # These dependencies are not used running the tests but can cause deprecation warnings so we remove them before running the tests | |
| - name: Remove unused dependencies | |
| run: composer remove vimeo/psalm phpstan/phpstan friendsofphp/php-cs-fixer --dev --no-interaction --no-update | |
| - name: Remove RoadRunner dependencies on unsupported PHP versions | |
| if: ${{ runner.os == 'Windows' || matrix.php == '7.2' || matrix.php == '7.3' || matrix.php == '7.4' || matrix.php == '8.0' }} | |
| run: composer remove spiral/roadrunner-http spiral/roadrunner-worker --dev --no-interaction --no-update | |
| - name: Install dependencies | |
| uses: ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f # v3 | |
| with: | |
| dependency-versions: ${{ matrix.dependencies }} | |
| composer-options: --prefer-dist --no-security-blocking | |
| - name: Run tests | |
| run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml | |
| - name: Upload code coverage | |
| uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5 | |
| with: | |
| file: build/coverage-report.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| missing-optional-packages-tests: | |
| name: Tests without optional packages | |
| runs-on: ubuntu-latest | |
| env: | |
| SYMFONY_REQUIRE: ${{ matrix.symfony-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - php: '7.2' | |
| dependencies: lowest | |
| symfony-version: 4.4.* | |
| - php: '7.4' | |
| dependencies: highest | |
| - php: '8.0' | |
| dependencies: lowest | |
| symfony-version: 4.4.* | |
| - php: '8.4' | |
| dependencies: highest | |
| symfony-version: 8.* | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@728c6c6b8cf02c2e48117716a91ee48313958a19 # v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: pcov | |
| tools: flex | |
| - name: Setup Problem Matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| # These dependencies are not used running the tests but can cause deprecation warnings so we remove them before running the tests | |
| - name: Remove unused dependencies | |
| run: composer remove vimeo/psalm phpstan/phpstan friendsofphp/php-cs-fixer --dev --no-interaction --no-update | |
| - name: Remove RoadRunner dependencies on unsupported PHP versions | |
| if: ${{ runner.os == 'Windows' || matrix.php == '7.2' || matrix.php == '7.3' || matrix.php == '7.4' || matrix.php == '8.0' }} | |
| run: composer remove spiral/roadrunner-http spiral/roadrunner-worker --dev --no-interaction --no-update | |
| - name: Remove optional packages | |
| run: composer remove doctrine/dbal doctrine/doctrine-bundle symfony/messenger symfony/twig-bundle symfony/cache symfony/http-client --dev --no-update | |
| - name: Install dependencies | |
| uses: ramsey/composer-install@a8d0d959dab41457692a5e2041bd9b757a119e3f # v3 | |
| with: | |
| dependency-versions: ${{ matrix.dependencies }} | |
| composer-options: --prefer-dist --no-security-blocking | |
| - name: Run tests | |
| run: vendor/bin/phpunit --coverage-clover=build/coverage-report.xml | |
| - name: Upload code coverage | |
| uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5 | |
| with: | |
| file: build/coverage-report.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| runtime-tests-frankenphp: | |
| name: Runtime tests (FrankenPHP) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 2 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: none | |
| - name: Determine Composer cache directory | |
| id: composer-cache | |
| run: echo "directory=$(composer config cache-dir)" >> "$GITHUB_OUTPUT" | |
| shell: bash | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.directory }} | |
| key: ${{ runner.os }}-runtime-frankenphp-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-runtime-frankenphp-composer- | |
| - name: Install dependencies | |
| run: composer install --no-progress --no-interaction --prefer-dist | |
| - name: Install FrankenPHP | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| set -euo pipefail | |
| case "$(uname -m)" in | |
| x86_64) asset="frankenphp-linux-x86_64" ;; | |
| aarch64|arm64) asset="frankenphp-linux-aarch64" ;; | |
| *) echo "Unsupported architecture: $(uname -m)"; exit 1 ;; | |
| esac | |
| digest="$(gh api "repos/php/frankenphp/releases/tags/${FRANKENPHP_VERSION}" --jq ".assets[] | select(.name == \"${asset}\") | .digest")" | |
| if [ -z "${digest}" ]; then | |
| echo "Unable to resolve digest for ${asset} (${FRANKENPHP_VERSION})." | |
| exit 1 | |
| fi | |
| gh release download "${FRANKENPHP_VERSION}" \ | |
| --repo php/frankenphp \ | |
| --pattern "${asset}" \ | |
| --output "${asset}" | |
| echo "${digest#sha256:} ${asset}" | sha256sum --check -- | |
| mkdir -p "${RUNNER_TEMP}/bin" | |
| install -m 0755 "${asset}" "${RUNNER_TEMP}/bin/frankenphp" | |
| echo "${RUNNER_TEMP}/bin" >> "${GITHUB_PATH}" | |
| "${RUNNER_TEMP}/bin/frankenphp" version | |
| shell: bash | |
| - name: Run full PHPUnit test suite | |
| run: vendor/bin/phpunit --verbose | |
| runtime-tests-roadrunner: | |
| name: Runtime tests (RoadRunner) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 2 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.4' | |
| coverage: none | |
| - name: Determine Composer cache directory | |
| id: composer-cache | |
| run: echo "directory=$(composer config cache-dir)" >> "$GITHUB_OUTPUT" | |
| shell: bash | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.directory }} | |
| key: ${{ runner.os }}-runtime-roadrunner-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-runtime-roadrunner-composer- | |
| - name: Install dependencies | |
| run: composer install --no-progress --no-interaction --prefer-dist | |
| - name: Install RoadRunner | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| set -euo pipefail | |
| case "$(uname -m)" in | |
| x86_64) arch="amd64" ;; | |
| aarch64|arm64) arch="arm64" ;; | |
| *) echo "Unsupported architecture: $(uname -m)"; exit 1 ;; | |
| esac | |
| version_no_prefix="${ROADRUNNER_VERSION#v}" | |
| asset="roadrunner-${version_no_prefix}-linux-${arch}.tar.gz" | |
| digest="$(gh api "repos/roadrunner-server/roadrunner/releases/tags/${ROADRUNNER_VERSION}" --jq ".assets[] | select(.name == \"${asset}\") | .digest")" | |
| if [ -z "${digest}" ]; then | |
| echo "Unable to resolve digest for ${asset} (${ROADRUNNER_VERSION})." | |
| exit 1 | |
| fi | |
| gh release download "${ROADRUNNER_VERSION}" \ | |
| --repo roadrunner-server/roadrunner \ | |
| --pattern "${asset}" \ | |
| --output "${asset}" | |
| echo "${digest#sha256:} ${asset}" | sha256sum --check -- | |
| tar -xzf "${asset}" --strip-components=1 "${asset%.tar.gz}/rr" | |
| mkdir -p "${RUNNER_TEMP}/bin" | |
| install -m 0755 rr "${RUNNER_TEMP}/bin/rr" | |
| echo "${RUNNER_TEMP}/bin" >> "${GITHUB_PATH}" | |
| "${RUNNER_TEMP}/bin/rr" --version | |
| shell: bash | |
| - name: Run full PHPUnit test suite | |
| run: vendor/bin/phpunit --verbose |