minor #1205 Move GitHub workflow files to .github/workflows/ direct…
#6599
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: Code Quality | |
| on: | |
| push: | |
| paths-ignore: | |
| - 'src/*/doc/**' | |
| - 'src/**/*.md' | |
| pull_request: | |
| paths-ignore: | |
| - 'src/*/doc/**' | |
| - 'src/**/*.md' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| PHP_VERSION: '8.5' | |
| REQUIRED_PHP_EXTENSIONS: 'mongodb, redis' | |
| jobs: | |
| # =========================================== | |
| # Build Matrix | |
| # =========================================== | |
| matrix: | |
| name: Matrix | |
| uses: ./.github/workflows/build-matrix.yaml | |
| # =========================================== | |
| # PHPStan | |
| # =========================================== | |
| phpstan-demo: | |
| needs: matrix | |
| name: PHPStan / Demo | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ env.PHP_VERSION }} | |
| extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }} | |
| - name: Install root dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Build root packages | |
| run: php .github/build-packages.php | |
| - name: Install dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| working-directory: demo | |
| - name: Link packages | |
| run: cd demo && ../link | |
| - name: Run PHPStan | |
| run: cd demo && vendor/bin/phpstan | |
| phpstan-examples: | |
| needs: matrix | |
| name: PHPStan / Examples | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ env.PHP_VERSION }} | |
| extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }} | |
| - name: Install root dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Build root packages | |
| run: php .github/build-packages.php | |
| - name: Install dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| working-directory: examples | |
| - name: Link packages | |
| run: cd examples && ../link | |
| - name: Run PHPStan | |
| run: cd examples && vendor/bin/phpstan | |
| phpstan-package: | |
| name: PHPStan / ${{ matrix.package.type }} / ${{ matrix.package.name }} | |
| needs: matrix | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: ${{ fromJson(needs.matrix.outputs.packages) }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ env.PHP_VERSION }} | |
| extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }} | |
| - name: Install root dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Build root packages | |
| run: php .github/build-packages.php | |
| - name: Install dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| working-directory: src/${{ matrix.package.path }} | |
| - name: Run PHPStan | |
| run: cd src/${{ matrix.package.path }} && vendor/bin/phpstan | |
| phpstan-bridge: | |
| name: PHPStan / ${{ matrix.bridge.type }} / ${{ matrix.bridge.bridge }} | |
| needs: matrix | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| bridge: ${{ fromJson(needs.matrix.outputs.bridges) }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ env.PHP_VERSION }} | |
| extensions: ${{ env.REQUIRED_PHP_EXTENSIONS }} | |
| - name: Install root dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Build root packages | |
| run: php .github/build-packages.php | |
| # Remove root vendor and bridge vendor to avoid circular symlinks when installing bridge dependencies | |
| - name: Clean vendor folders | |
| run: rm -rf vendor src/${{ matrix.bridge.component }}/src/Bridge/${{ matrix.bridge.bridge }}/vendor | |
| - name: Install dependencies | |
| uses: ramsey/composer-install@v3 | |
| with: | |
| working-directory: src/${{ matrix.bridge.component }}/src/Bridge/${{ matrix.bridge.bridge }} | |
| - name: Run PHPStan | |
| run: cd src/${{ matrix.bridge.component }}/src/Bridge/${{ matrix.bridge.bridge }} && vendor/bin/phpstan |