Skip to content

Commit cbd3632

Browse files
authored
Merge pull request Insolita#13 from Insolita/dev
add qodana action for test
2 parents 9278fa3 + fde1c39 commit cbd3632

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/qodana.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Qodana - Code Inspection
2+
3+
# The name of the GitHub event that triggers the workflow.
4+
on:
5+
# You can manually trigger workflow runs
6+
# https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow
7+
workflow_dispatch:
8+
9+
# You can trigger workflow on push or pull-request event and configure a workflow to run on specific branches or tags
10+
# push:
11+
# branches:
12+
# - master
13+
# - dev
14+
# pull_request:
15+
# branches:
16+
# - master
17+
18+
jobs:
19+
code_inspection:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
26+
# Logins against a Docker registry. [optional step]
27+
# https://github.com/marketplace/actions/docker-login
28+
# - name: Login to DockerHub
29+
# uses: docker/login-action@v1
30+
# with:
31+
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
32+
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
33+
34+
# Runs Qodana
35+
- name: Qodana - Code Inspection
36+
timeout-minutes: 600
37+
run: docker run -v ${GITHUB_WORKSPACE}:/data/project -v ${GITHUB_WORKSPACE}/qodana:/data/results jetbrains/qodana:2020.3-eap --save-report
38+
39+
# Archives Qodana results to workflow artifacts
40+
- name: Archive results
41+
uses: actions/upload-artifact@v2
42+
with:
43+
name: qodana-results
44+
if-no-files-found: error
45+
path: qodana/report/results
46+
47+
# Prints Qodana results
48+
- name: Print results
49+
run: |
50+
echo "🎉 Qodana has finished successfully!"
51+
echo "Download an artifact qodana-results.zip. Code Inspection results are part of file result-allProblems.json."
52+
echo "________________________________________________________________"
53+
cat ${GITHUB_WORKSPACE}/qodana/report/results/result-allProblems.json
54+
# Archives Qodana error logs if Qodana fails
55+
- name: Archive error logs
56+
uses: actions/upload-artifact@v2
57+
if: failure()
58+
with:
59+
name: qodana-error-logs
60+
path: qodana
61+
62+
# Prints error message
63+
- name: Print error message
64+
if: failure()
65+
run: |
66+
echo "❌ Qodana has failed"
67+
echo "Please contact our support team by email at qodana-support@jetbrains.com. Attach qodana-error-logs.zip to your message."

0 commit comments

Comments
 (0)