|
| 1 | +name: Quality Assurance |
| 2 | + |
| 3 | +on: |
| 4 | + push: # (or pull requests) |
| 5 | + paths: |
| 6 | + - '.github/workflows/**' |
| 7 | + - '**.php' |
| 8 | + - 'psalm.xml.dist' |
| 9 | + - 'composer.json' |
| 10 | + |
| 11 | +jobs: |
| 12 | + composer-validate: |
| 13 | + name: composer-validate |
| 14 | + runs-on: ubuntu-latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Setup PHP 🔧 |
| 19 | + uses: shivammathur/setup-php@v2 |
| 20 | + with: |
| 21 | + php-version: 8.3 |
| 22 | + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick |
| 23 | + coverage: none |
| 24 | + tools: composer:v2 |
| 25 | + |
| 26 | + - name: Validate composer.json and composer.lock 👀 |
| 27 | + run: composer validate |
| 28 | + |
| 29 | + psalm: |
| 30 | + name: psalm |
| 31 | + runs-on: ubuntu-latest |
| 32 | + steps: |
| 33 | + - uses: actions/checkout@v4 |
| 34 | + |
| 35 | + - name: Setup PHP 🔧 |
| 36 | + uses: shivammathur/setup-php@v2 |
| 37 | + with: |
| 38 | + php-version: 8.3 |
| 39 | + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick |
| 40 | + coverage: none |
| 41 | + tools: composer:v2 |
| 42 | + |
| 43 | + - name: Install Dependencies 🔧 |
| 44 | + run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist |
| 45 | + |
| 46 | + # Installing psalm separately due to conflict with phpunit |
| 47 | + - name: Install psalm |
| 48 | + run: | |
| 49 | + wget https://github.com/vimeo/psalm/releases/latest/download/psalm.phar |
| 50 | + chmod +x psalm.phar |
| 51 | + mv psalm.phar /usr/local/bin/psalm |
| 52 | +
|
| 53 | + - name: Run psalm |
| 54 | + run: psalm --output-format=github |
| 55 | + |
| 56 | + phploc: |
| 57 | + name: phploc |
| 58 | + runs-on: ubuntu-latest |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v4 |
| 61 | + |
| 62 | + - name: Setup PHP 🔧 |
| 63 | + uses: shivammathur/setup-php@v2 |
| 64 | + with: |
| 65 | + php-version: 8.3 |
| 66 | + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick |
| 67 | + coverage: none |
| 68 | + tools: composer:v2 |
| 69 | + |
| 70 | + - name: Download phploc 🔧 |
| 71 | + run: wget https://phar.phpunit.de/phploc.phar |
| 72 | + |
| 73 | + - name: Run phploc |
| 74 | + run: php phploc.phar src/ |
0 commit comments