-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (51 loc) · 1.39 KB
/
qodana_code_quality.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
46
47
48
49
50
51
52
name: Qodana
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
qodana:
# noinspection SpellCheckingInspection
if: github.repository_owner == 'ryanvade'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
checks: write
security-events: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-qodana-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Archive coverage data
uses: actions/upload-artifact@v3
with:
name: jest-coverage-data
path: .qodana/code-coverage
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
args: --apply-fixes
push-fixes: pull-request
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json