fix(integration-discord): handle 429 rate limits #779
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: Continuous Integration | |
| on: | |
| push: | |
| branches: [4.x] | |
| pull_request: | |
| branches: [4.x] | |
| types: [opened, reopened, synchronize, ready_for_review] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| setup: | |
| name: Setup PHP | |
| runs-on: ubuntu-latest | |
| if: ${{ !github.event.pull_request.draft }} | |
| timeout-minutes: 5 | |
| permissions: | |
| contents: read | |
| outputs: | |
| CACHE_KEY: ${{ steps.cache.outputs.key }} | |
| PHP_VERSION: ${{ steps.setup.outputs.PHP_VERSION }} | |
| PHP_EXTENSIONS: ${{ steps.setup.outputs.PHP_EXTENSIONS }} | |
| PHP_INI_PROPERTIES: ${{ steps.setup.outputs.PHP_INI_PROPERTIES }} | |
| COMPOSER_FLAGS: ${{ steps.setup.outputs.COMPOSER_FLAGS }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup job outputs | |
| id: setup | |
| run: | | |
| echo "PHP_VERSION=8.4" >> "$GITHUB_OUTPUT" | |
| echo "PHP_EXTENSIONS=mbstring,pdo,pdo_pgsql,xml,ctype,fileinfo,json,curl,openssl,dom,zip" >> "$GITHUB_OUTPUT" | |
| echo "PHP_INI_PROPERTIES=post_max_size=256M,upload_max_filesize=256M" >> "$GITHUB_OUTPUT" | |
| echo "COMPOSER_FLAGS=--prefer-dist --optimize-autoloader" >> "$GITHUB_OUTPUT" | |
| - name: Create cache key | |
| id: cache | |
| shell: bash | |
| env: | |
| RUNNER_OS: ${{ runner.os }} | |
| RUNNER_ARCH: ${{ runner.arch }} | |
| HASHED_COMPOSER_LOCK: ${{ hashFiles('composer.lock') }} | |
| run: | | |
| composer_hash=${HASHED_COMPOSER_LOCK} | |
| os_lower=$(echo ${RUNNER_OS} | tr '[:upper:]' '[:lower:]') | |
| arch_lower=$(echo ${RUNNER_ARCH} | tr '[:upper:]' '[:lower:]') | |
| combined_key="${os_lower}-${arch_lower}-composer-${composer_hash}" | |
| echo "key=${combined_key}" >> "$GITHUB_OUTPUT" | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # v2.37.1 | |
| with: | |
| php-version: ${{ steps.setup.outputs.PHP_VERSION }} | |
| extensions: ${{ steps.setup.outputs.PHP_EXTENSIONS }} | |
| ini-values: ${{ steps.setup.outputs.PHP_INI_PROPERTIES }} | |
| coverage: xdebug | |
| tools: composer:v2 | |
| - name: Install composer dependencies | |
| uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # v4.0.0 | |
| with: | |
| composer-options: ${{ steps.setup.outputs.COMPOSER_FLAGS }} | |
| custom-cache-key: ${{ steps.cache.outputs.key }} | |
| pint: | |
| name: Perform Pint format | |
| needs: [setup] | |
| if: ${{ !github.event.pull_request.draft }} | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/_pint.yml | |
| with: | |
| CACHE_KEY: ${{ needs.setup.outputs.CACHE_KEY }} | |
| COMPOSER_FLAGS: ${{ needs.setup.outputs.COMPOSER_FLAGS }} | |
| PHP_EXTENSIONS: ${{ needs.setup.outputs.PHP_EXTENSIONS }} | |
| PHP_INI_PROPERTIES: ${{ needs.setup.outputs.PHP_INI_PROPERTIES }} | |
| PHP_VERSION: ${{ needs.setup.outputs.PHP_VERSION }} | |
| rector: | |
| name: Perform Rector Check | |
| needs: [setup] | |
| if: ${{ !github.event.pull_request.draft }} | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/_rector.yml | |
| with: | |
| CACHE_KEY: ${{ needs.setup.outputs.CACHE_KEY }} | |
| COMPOSER_FLAGS: ${{ needs.setup.outputs.COMPOSER_FLAGS }} | |
| PHP_EXTENSIONS: ${{ needs.setup.outputs.PHP_EXTENSIONS }} | |
| PHP_INI_PROPERTIES: ${{ needs.setup.outputs.PHP_INI_PROPERTIES }} | |
| PHP_VERSION: ${{ needs.setup.outputs.PHP_VERSION }} | |
| phpstan: | |
| name: Perform Phpstan Check | |
| needs: [setup] | |
| if: ${{ !github.event.pull_request.draft }} | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/_phpstan.yml | |
| with: | |
| CACHE_KEY: ${{ needs.setup.outputs.CACHE_KEY }} | |
| COMPOSER_FLAGS: ${{ needs.setup.outputs.COMPOSER_FLAGS }} | |
| PHP_EXTENSIONS: ${{ needs.setup.outputs.PHP_EXTENSIONS }} | |
| PHP_INI_PROPERTIES: ${{ needs.setup.outputs.PHP_INI_PROPERTIES }} | |
| PHP_VERSION: ${{ needs.setup.outputs.PHP_VERSION }} | |
| pest: | |
| name: Perform Pest Tests | |
| needs: [setup] | |
| if: ${{ !github.event.pull_request.draft }} | |
| permissions: | |
| contents: read | |
| uses: ./.github/workflows/_pest.yml | |
| with: | |
| CACHE_KEY: ${{ needs.setup.outputs.CACHE_KEY }} | |
| COMPOSER_FLAGS: ${{ needs.setup.outputs.COMPOSER_FLAGS }} | |
| PHP_EXTENSIONS: ${{ needs.setup.outputs.PHP_EXTENSIONS }} | |
| PHP_INI_PROPERTIES: ${{ needs.setup.outputs.PHP_INI_PROPERTIES }} | |
| PHP_VERSION: ${{ needs.setup.outputs.PHP_VERSION }} |