Repository navigation
Update GitHub Actions #583
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
| # https://help.github.com/en/categories/automating-your-workflow-with-github-actions | |
| name: "Build" | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - "2.0.x" | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: "Lint" | |
| runs-on: "ubuntu-latest" | |
| env: | |
| COMPOSER_IGNORE_PLATFORM_REQ: "${{ matrix.php-version == '8.6' && 'php+' || '' }}" # PHP 8.6 is a pre-release; dependencies don't allow it yet | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "7.4" | |
| - "8.0" | |
| - "8.1" | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| - "8.5" | |
| - "8.6" | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2 | |
| with: | |
| egress-policy: audit | |
| - name: "Checkout" | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # v2 | |
| with: | |
| coverage: "none" | |
| php-version: "${{ matrix.php-version }}" | |
| - name: "Validate Composer" | |
| run: "composer validate" | |
| - name: "Install dependencies" | |
| run: "composer install --no-interaction --no-progress" | |
| - name: "Lint" | |
| run: "make lint" | |
| coding-standard: | |
| name: "Coding Standard" | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2 | |
| with: | |
| egress-policy: audit | |
| - name: "Checkout" | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: "Checkout build-cs" | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: "phpstan/build-cs" | |
| path: "build-cs" | |
| ref: "2.x" | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # v2 | |
| with: | |
| coverage: "none" | |
| php-version: "8.2" | |
| - name: "Validate Composer" | |
| run: "composer validate" | |
| - name: "Install dependencies" | |
| run: "composer install --no-interaction --no-progress" | |
| - name: "Install build-cs dependencies" | |
| working-directory: "build-cs" | |
| run: "composer install --no-interaction --no-progress" | |
| - name: "Lint" | |
| run: "make lint" | |
| - name: "Coding Standard" | |
| run: "make cs" | |
| tests: | |
| name: "Tests" | |
| runs-on: "ubuntu-latest" | |
| env: | |
| COMPOSER_IGNORE_PLATFORM_REQ: "${{ matrix.php-version == '8.6' && 'php+' || '' }}" # PHP 8.6 is a pre-release; dependencies don't allow it yet | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: | |
| - "7.4" | |
| - "8.0" | |
| - "8.1" | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| - "8.5" | |
| - "8.6" | |
| dependencies: | |
| - "lowest" | |
| - "highest" | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2 | |
| with: | |
| egress-policy: audit | |
| - name: "Checkout" | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # v2 | |
| with: | |
| coverage: "none" | |
| php-version: "${{ matrix.php-version }}" | |
| - name: "Install lowest dependencies" | |
| if: ${{ matrix.dependencies == 'lowest' }} | |
| run: "composer update --prefer-lowest --no-interaction --no-progress" | |
| - name: "Install highest dependencies" | |
| if: ${{ matrix.dependencies == 'highest' }} | |
| run: "composer update --no-interaction --no-progress" | |
| - name: "Tests" | |
| run: "make tests" | |
| static-analysis: | |
| name: "PHPStan" | |
| runs-on: "ubuntu-latest" | |
| env: | |
| COMPOSER_IGNORE_PLATFORM_REQ: "${{ matrix.php-version == '8.6' && 'php+' || '' }}" # PHP 8.6 is a pre-release; dependencies don't allow it yet | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: | |
| - "7.4" | |
| - "8.0" | |
| - "8.1" | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| - "8.5" | |
| - "8.6" | |
| dependencies: | |
| - "lowest" | |
| - "highest" | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2 | |
| with: | |
| egress-policy: audit | |
| - name: "Checkout" | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # v2 | |
| with: | |
| coverage: "none" | |
| php-version: "${{ matrix.php-version }}" | |
| extensions: mbstring | |
| tools: composer:v2 | |
| - name: "Install lowest dependencies" | |
| if: ${{ matrix.dependencies == 'lowest' }} | |
| run: "composer update --prefer-lowest --no-interaction --no-progress" | |
| - name: "Install highest dependencies" | |
| if: ${{ matrix.dependencies == 'highest' }} | |
| run: "composer update --no-interaction --no-progress" | |
| - name: "PHPStan" | |
| run: "make phpstan" | |
| name-collision: | |
| name: "Name Collision Detector" | |
| runs-on: "ubuntu-latest" | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Harden the runner (Audit all outbound calls) | |
| uses: step-security/harden-runner@dc2769abcc0fcfbadfc1df54081c1608579ef6b2 # v2.22.2 | |
| with: | |
| egress-policy: audit | |
| - name: "Checkout" | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # v2 | |
| with: | |
| coverage: "none" | |
| php-version: "8.5" | |
| - uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # v4.0.0 | |
| - name: "Name Collision Detector" | |
| run: "make name-collision" |