Skip to content

Commit d49f2c8

Browse files
authored
Try psalm action
1 parent e1ad51f commit d49f2c8

File tree

1 file changed

+6
-38
lines changed

1 file changed

+6
-38
lines changed

.github/workflows/codeql.yml

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,51 +11,19 @@ on:
1111

1212
jobs:
1313
analyze:
14-
strategy:
15-
matrix:
16-
php-versions: [ '8.0', '8.1', '8.2', '8.3', '8.4' ]
1714
runs-on: ubuntu-latest
1815
timeout-minutes: 10
19-
name: Analyze PHP ${{ matrix.php-versions }}
16+
name: Analyze PHP
2017

2118
steps:
2219
- uses: actions/checkout@v3
2320
name: Check Out Code
2421

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
5927

6028
- name: Upload SARIF report
6129
uses: github/codeql-action/upload-sarif@v3

0 commit comments

Comments
 (0)