|
11 | 11 |
|
12 | 12 | jobs: |
13 | 13 | analyze: |
14 | | - strategy: |
15 | | - matrix: |
16 | | - php-versions: [ '8.0', '8.1', '8.2', '8.3', '8.4' ] |
17 | 14 | runs-on: ubuntu-latest |
18 | 15 | timeout-minutes: 10 |
19 | | - name: Analyze PHP ${{ matrix.php-versions }} |
| 16 | + name: Analyze PHP |
20 | 17 |
|
21 | 18 | steps: |
22 | 19 | - uses: actions/checkout@v3 |
23 | 20 | name: Check Out Code |
24 | 21 |
|
25 | | - - name: Setup PHP |
26 | | - uses: shivammathur/setup-php@v2 |
27 | | - with: |
28 | | - php-version: ${{ matrix.php-versions }} |
29 | | - tools: pecl |
30 | | - extensions: pdo_mysql, pdo_pgsql, pdo_sqlite, sqlsrv, pdo_sqlsrv |
31 | | - |
32 | | - - name: Validate composer.json and composer.lock |
33 | | - run: composer validate |
34 | | - |
35 | | - - name: Setup Composer Access |
36 | | - run: composer config -g github-oauth.github.com ${{ secrets.ACTIONS_ACCESS_TOKEN }} |
37 | | - |
38 | | - - name: Cache Composer packages |
39 | | - id: composer-cache |
40 | | - uses: actions/cache@v4 |
41 | | - with: |
42 | | - path: vendor |
43 | | - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} |
44 | | - restore-keys: | |
45 | | - ${{ runner.os }}-composer- |
46 | | -
|
47 | | - - name: Install dependencies |
48 | | - if: steps.composer-cache.outputs.cache-hit != 'true' |
49 | | - run: composer install --prefer-dist --no-progress --optimize-autoloader |
50 | | - |
51 | | - - name: Perform CodeQL Analysis using Psalm |
52 | | - run: | |
53 | | - if [ "${{ github.event_name }}" == "pull_request" ]; then |
54 | | - vendor/bin/psalm --diff --output-format=sarif --report=psalm-report.sarif || true |
55 | | - else |
56 | | - vendor/bin/psalm --no-diff --output-format=sarif --report=psalm-report.sarif || true |
57 | | - fi |
58 | | - continue-on-error: true |
| 22 | + - name: Psalm |
| 23 | + uses: docker://ghcr.io/psalm/psalm-github-actions |
| 24 | ++ with: |
| 25 | ++ security_analysis: true |
| 26 | ++ report_file: psalm-report.sarif |
59 | 27 |
|
60 | 28 | - name: Upload SARIF report |
61 | 29 | uses: github/codeql-action/upload-sarif@v3 |
|
0 commit comments