Add phan and update mediawiki-codesniffer to v48 #1282
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: PHP build | |
| on: | |
| [pull_request, push] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # PHP v8.5 has issues with Phan 5.5.1 | |
| # Method SplObjectStorage::attach() is deprecated since 8.5, use method SplObjectStorage::offsetSet() instead | |
| php: [8.1, 8.2, 8.3, 8.4] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-interaction --ansi | |
| - name: Running phpcs | |
| run: composer run-script cs | |
| - name: Running yaml-sort-checker | |
| run: composer run-script yaml-sort-check | |
| - name: Run tests | |
| run: php ./vendor/bin/phpunit | |
| - name: Running phan | |
| run: composer run-script phan |