forked from MaaAssistantArknights/MaaAssistantArknights
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.14 KB
/
qodana.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
name: Qodana static analysis
on:
workflow_dispatch:
pull_request: # 在 PR 更新的场合进行扫描
paths:
- ".github/workflows/qodana.yml"
- "src/MaaWpfGui/*"
- "qodana.yaml"
- "src/MaaWpfGui/**"
- "MAA.sln"
push: # 在主分支推送代码的场合进行扫描
branches:
- master
- "releases/*"
- dev
paths:
- ".github/workflows/qodana.yml"
- "src/MaaWpfGui/**"
- "qodana.yaml"
permissions:
contents: write
pull-requests: write
checks: write
jobs:
qodana:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis
show-progress: false
- name: Qodana Scan
uses: JetBrains/qodana-action@main
with:
pr-mode: false
post-pr-comment: true
args: --baseline,.github/qodana.sarif.json
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}