Skip to content

Commit

Permalink
CI: config qodana
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Chan committed Sep 4, 2023
1 parent 784d74a commit aa7bc16
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 27 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/qodana-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- master
- dev
- 'releases/*'

jobs:
qodana:
runs-on: ubuntu-latest
permissions:

Check notice

Code scanning / Checkov (reported by Codacy)

Ensure top-level permissions are not set to write-all Note

Ensure top-level permissions are not set to write-all
contents: write
pull-requests: write
checks: write
steps:
- uses: actions/checkout@v3
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

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'

- name: Cache local Maven repository
uses: actions/[email protected]
env:
cache-name: cache-mvn
with:
path: ~/.m2/repository
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Run tests
run: mvn -B test -DskipTests=false

- name: Archive coverage data
uses: actions/upload-artifact@v2
with:
name: jest-coverage-data
path: .qodana/code-coverage

- name: 'Qodana Scan'
uses: JetBrains/[email protected]
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
with:
# Enable the pull-request mode
pr-mode: true
27 changes: 0 additions & 27 deletions .github/workflows/qodana.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ target/
# flattened pom
.flattened-pom.xml

### Qodana
.qodana

### logs ####
/logs/
*.log
Expand Down
21 changes: 21 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# https://www.jetbrains.com/help/qodana/qodana-yaml.html

version: 1.0

# bootstrap: apt install <package_name>


# Qodana compares maven jdk values and selects the latest version
# projectJDK: corretto-17

# Starting from version 2022.3, if using the qodana.recommended and qodana.starter profiles, Qodana reads .gitignore
# files of your project and defines the files and folders to be ignored during inspections.
exclude:
- name: All
paths:
- .mvn

include:
- name: CheckDependencyLicenses

fixesStrategy: cleanup/apply

0 comments on commit aa7bc16

Please sign in to comment.