Add Qodana to GitHub Actions #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check-changed-files | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
permissions: | |
actions: read | |
jobs: | |
qodana: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: ${{ github.event.pull_request.commits }} | |
- name: Get two more commits so Qodana we can identify the changes | |
if: github.event_name == 'pull_request' | |
run: git fetch --deepen=2 | |
- name: Run Qodana inspection | |
uses: JetBrains/qodana-action@v2024.3.4 | |
with: | |
upload-result: true | |
args: > | |
--baseline,doc/qodana-baseline.sarif.json, | |
--config,.qodana/qodana.yaml | |
# This step uploads the SARIF file to GitHub so that the code scanning feature can use it. | |
# https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github#example-workflow-that-runs-the-eslint-analysis-tool | |
- name: Upload SARIF report to GitHub | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json |