docs: add GitHub Actions lint badge and translate README #5
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: Lint (PHPStan + PHPCS) | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| lint: | |
| name: Lint (PHP ${{ matrix.php-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php-version: [ '8.1', '8.2' ] | |
| defaults: | |
| run: | |
| working-directory: app # 👈 all commands will run from /app | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup PHP ${{ matrix.php-version }} | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: mbstring, json, xml, pdo, tokenizer | |
| coverage: none | |
| - name: Validate composer.json | |
| run: composer validate --no-check-publish | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.composer/cache/files | |
| key: ${{ runner.os }}-composer-${{ hashFiles('app/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer- | |
| - name: Install dependencies | |
| run: composer install --no-progress --no-suggest --prefer-dist --no-interaction | |
| - name: Run lint (phpstan + phpcs) | |
| run: make lint |