Skip to content

language list imporvments #490

language list imporvments

language list imporvments #490

name: Exercise linting with PHPCS for PSR 12
on:
workflow_dispatch:
push:
branches:
- main
- master
pull_request:
jobs:
test:
name: PHP ${{ matrix.php-version }} - ${{ matrix.os }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
php-version: [8.0, 8.1, 8.2]
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Set git line endings
if: ${{ matrix.os == 'windows-latest' }}
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@72ae4ccbe57f82bbe08411e84e2130bd4ba1c10f
with:
php-version: ${{ matrix.php-version }}
extensions: gmp
tools: composer
- name: Install dependencies
shell: bash
run: |
curl -Lo bin/phpcs.phar https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
chmod +x bin/phpcs.phar
- name: Install composer packages
run: composer install
- name: Lint exercises
shell: bash
run: composer lint:check