|
27 | 27 | uses: "shivammathur/setup-php@v2"
|
28 | 28 | with:
|
29 | 29 | coverage: "none"
|
30 |
| - extensions: "none, curl, json, mbstring, tokenizer" |
| 30 | + extensions: "none, curl, dom, json, mbstring, simplexml, tokenizer" |
31 | 31 | php-version: "${{ matrix.php-version }}"
|
32 | 32 |
|
33 | 33 | - name: "Set up problem matchers for PHP"
|
|
54 | 54 | env:
|
55 | 55 | PHP_CS_FIXER_IGNORE_ENV: "1"
|
56 | 56 |
|
| 57 | + static-code-analysis: |
| 58 | + name: "Static Code Analysis" |
| 59 | + |
| 60 | + runs-on: "ubuntu-latest" |
| 61 | + |
| 62 | + strategy: |
| 63 | + matrix: |
| 64 | + php-version: |
| 65 | + - "8.2" |
| 66 | + |
| 67 | + dependencies: |
| 68 | + - "locked" |
| 69 | + |
| 70 | + steps: |
| 71 | + - name: "Checkout" |
| 72 | + uses: "actions/checkout@v3" |
| 73 | + |
| 74 | + - name: "Set up PHP" |
| 75 | + uses: "shivammathur/setup-php@v2" |
| 76 | + with: |
| 77 | + coverage: "none" |
| 78 | + extensions: "none, dom, json, mbstring, opcache, pcntl, posix, simplexml, tokenizer" |
| 79 | + php-version: "${{ matrix.php-version }}" |
| 80 | + |
| 81 | + - name: "Set up problem matchers for PHP" |
| 82 | + run: "echo \"::add-matcher::${{ runner.tool_cache }}/php.json\"" |
| 83 | + |
| 84 | + - name: "Determine composer cache directory" |
| 85 | + run: "echo \"COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV" |
| 86 | + |
| 87 | + - name: "Cache dependencies installed with composer" |
| 88 | + uses: "actions/cache@v3" |
| 89 | + with: |
| 90 | + path: "${{ env.COMPOSER_CACHE_DIR }}" |
| 91 | + key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}" |
| 92 | + restore-keys: "php-${{ matrix.php-version }}-composer-" |
| 93 | + |
| 94 | + - name: "Install dependencies with composer" |
| 95 | + run: "composer install --ansi --no-interaction --no-progress" |
| 96 | + |
| 97 | + - name: "Run vimeo/psalm" |
| 98 | + run: "vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4" |
| 99 | + |
57 | 100 | tests:
|
58 | 101 | name: "Tests"
|
59 | 102 |
|
|
0 commit comments