Update README.md and increase PHPStan level to 3. #130
Workflow file for this run
This file contains 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: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: GitHub Action - CI | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php: [8.1, 8.2, 8.3] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: none | |
- name: Start MySQL | |
run: sudo /etc/init.d/mysql start | |
- name: Validate composer.json | |
run: composer validate --strict | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-scripts --no-interaction | |
- name: Ignore PHPCS warnings | |
run: ./vendor/bin/phpcs --config-set ignore_warnings_on_exit 1 | |
- name: Install drupal | |
run: ./vendor/bin/drush site:install testing --root sut --db-url mysql://root:root@localhost/drupal --yes | |
- name: Run code sniffer | |
run: ./vendor/bin/phpcs --standard=Drupal,DrupalPractice --ignore='sut,vendor' . | |
- name: Run static analysis | |
run: ./vendor/bin/phpstan analyze UsersCommands.php tests/ | |
- name: Run unit tests | |
run: ./vendor/bin/phpunit |