Merge pull request #344 from IO500/dependabot/composer/twig/twig-3.27.1 #20
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| php-lint: | |
| name: PHP lint (phpcs + syntax) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| extensions: mbstring, intl, pdo_mysql | |
| coverage: none | |
| tools: composer:v2 | |
| - 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@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-composer- | |
| - name: Install composer dependencies | |
| run: composer install --prefer-dist --no-progress --no-interaction | |
| - name: Run phpcs (CakePHP coding standard) | |
| run: composer cs-check | |
| - name: PHP syntax check (php -l) | |
| run: | | |
| set -e | |
| find src tests config templates -type f -name '*.php' -print0 \ | |
| | xargs -0 -n1 -P4 php -l > /dev/null | |
| yaml-lint: | |
| name: YAML lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install yamllint | |
| run: pip install --quiet yamllint | |
| - name: Lint workflow and config YAML | |
| run: yamllint -d relaxed .github/ config/ |