-
-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (45 loc) · 1.39 KB
/
static-analysis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Static Analysis
on:
push:
branches: [main]
paths:
- '.github/workflows/static-analysis.yml'
- 'src/**'
- 'psalm.xml'
- 'psalm-baseline.xml'
pull_request:
branches: [main]
paths:
- '.github/workflows/static-analysis.yml'
- 'src/**'
- 'psalm.xml'
- 'psalm-baseline.xml'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read
strategy:
fail-fast: false
matrix:
php-version: ['8.1']
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php-version }}'
coverage: none
- run: make composer-install phpunit-install psalm-install
- run: php src/SonsOfPHP/Bard/bin/bard install -n -vvv
- run: make psalm-github
- name: Upload Security Analysis to Github
if: github.ref == 'refs/heads/main'
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif