42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: Qodana
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
branches: # Specify your branches here
|
|
- master
|
|
- main # The 'main' branch
|
|
- develop
|
|
- 'releases/*' # The release branches
|
|
|
|
jobs:
|
|
qodana:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
checks: write
|
|
steps:
|
|
# Checkout for pull_request events: use the PR head SHA for accurate analysis
|
|
- name: Checkout (pull_request)
|
|
if: ${{ github.event_name == 'pull_request' }}
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
fetch-depth: 0 # a full history is required for pull request analysis
|
|
|
|
# Checkout for push and other events (e.g., merges to develop): use the current commit
|
|
- name: Checkout (push/other)
|
|
if: ${{ github.event_name != 'pull_request' }}
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: 'Qodana Scan'
|
|
uses: JetBrains/qodana-action@v2025.2
|
|
with:
|
|
# Enable PR-specific reporting only for pull_request events
|
|
pr-mode: ${{ github.event_name == 'pull_request' }}
|
|
env:
|
|
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_268690425 }}
|
|
QODANA_ENDPOINT: 'https://qodana.cloud'
|