Internal: Use new (session-)course-user queries for users lists in co… #330
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 format code 🔎 | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| operating-system: [ubuntu-latest] | |
| php-versions: ['8.3'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup PHP, with composer and extensions | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, dom, gd, json, soap, zip, bcmath | |
| ini-values: post_max_size=256M, max_execution_time=600, memory_limit=4096M | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| # Use composer.json for key, if composer.lock is not committed. | |
| # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install dependencies with composer | |
| run: composer install --no-progress | |
| # A cold run over src/ + tests takes ~3.5 minutes; ECS caches per | |
| # file content, so restoring the previous run's cache brings a | |
| # typical pull request down to seconds. The key includes ecs.php | |
| # and composer.lock so changing a rule or a dependency version | |
| # invalidates it instead of trusting stale results. | |
| - name: Cache ecs results | |
| uses: actions/cache@v6 | |
| with: | |
| path: var/cache/ecs | |
| key: ${{ runner.os }}-ecs-${{ hashFiles('ecs.php', 'composer.lock') }}-${{ github.sha }} | |
| restore-keys: | | |
| ${{ runner.os }}-ecs-${{ hashFiles('ecs.php', 'composer.lock') }}- | |
| ${{ runner.os }}-ecs- | |
| - name: ecs (easy-coding-standard) | |
| id: analyse | |
| run: vendor/bin/ecs check |