Skip to content

Commit 554f7b9

Browse files
authored
Merge pull request #22 from pimcore/qodana_check
Reusable qodana check
2 parents aa07fa3 + 93dceff commit 554f7b9

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "Qodana check"
2+
3+
on:
4+
workflow_call:
5+
secrets:
6+
COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN:
7+
required: true
8+
QODANA_TOKEN:
9+
required: true
10+
11+
jobs:
12+
Qodana:
13+
timeout-minutes: 15
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: write
17+
pull-requests: write
18+
checks: write
19+
steps:
20+
- uses: actions/checkout@v3
21+
with:
22+
ref: ${{ github.event.pull_request.head.sha }}
23+
fetch-depth: 0
24+
25+
- name: Install PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: 8.2
29+
extensions: curl, mbstring, openssl, pdo, pdo_sqlite
30+
ini-values: memory_limit=-1, date.timezone='UTC'
31+
coverage: xdebug
32+
tools: composer:v2
33+
34+
- name: Validate composer.json and composer.lock
35+
run: composer validate
36+
37+
- name: Add authentication for private pimcore packages
38+
run: |
39+
composer config repositories.private-packagist composer https://repo.pimcore.com/github-actions/
40+
composer config --global --auth http-basic.repo.pimcore.com github-actions ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }}
41+
42+
- name: Install dependencies
43+
run: composer install --prefer-dist --no-progress --no-interaction
44+
45+
- name: "Qodana Scan"
46+
uses: JetBrains/qodana-action@latest
47+
with:
48+
use-caches: false
49+
args: --baseline,qodana.sarif.json
50+
env:
51+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}

0 commit comments

Comments
 (0)