Skip to content

Commit 8d31f7d

Browse files
authored
synchronize CI with admStorm and KphpStorm (#68)
* add the release workflow * add qodana
1 parent 41e23a7 commit 8d31f7d

24 files changed

+93880
-53
lines changed

.github/workflows/build.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,52 @@ jobs:
4444
- name: Build plugin
4545
run: ./gradlew buildPlugin
4646

47+
# Run Qodana inspections and provide a report
48+
inspectCode:
49+
name: Inspect code
50+
needs: [ build ]
51+
runs-on: ubuntu-latest
52+
if: github.event_name == 'pull_request'
53+
54+
permissions:
55+
contents: write
56+
checks: write
57+
pull-requests: write
58+
steps:
59+
60+
# Free GitHub Actions Environment Disk Space
61+
- name: Maximize Build Space
62+
uses: jlumbroso/[email protected]
63+
with:
64+
tool-cache: false
65+
large-packages: false
66+
67+
# Check out the current repository
68+
- name: Fetch Sources
69+
uses: actions/checkout@v4
70+
with:
71+
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
72+
fetch-depth: 0 # a full history is required for pull request analysis
73+
74+
# Set up the Java environment for the next steps
75+
- name: Setup Java
76+
uses: actions/setup-java@v4
77+
with:
78+
distribution: zulu
79+
java-version: 21
80+
81+
# Run Qodana inspections
82+
- name: Qodana - Code Inspection
83+
uses: JetBrains/[email protected]
84+
with:
85+
args: --baseline,./.qodana/baseline.sarif.json
86+
cache-default-branch-only: true
87+
88+
- name: Qodana - Publish Results
89+
uses: github/codeql-action/upload-sarif@v3
90+
with:
91+
sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
92+
4793
# Run tests and upload a code coverage report
4894
test:
4995
name: Test (${{ matrix.os }})

.github/workflows/release.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [released]
5+
jobs:
6+
7+
# Prepare and publish the GitHub releases
8+
release:
9+
name: Publish Plugin
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
pull-requests: write
14+
steps:
15+
16+
# Free GitHub Actions Environment Disk Space
17+
- name: Maximize Build Space
18+
uses: jlumbroso/[email protected]
19+
with:
20+
tool-cache: false
21+
large-packages: false
22+
23+
# Check out the current repository
24+
- name: Fetch Sources
25+
uses: actions/checkout@v4
26+
with:
27+
ref: ${{ github.event.release.tag_name }}
28+
29+
# Set up the Java environment for the next steps
30+
- name: Setup Java
31+
uses: actions/setup-java@v4
32+
with:
33+
distribution: zulu
34+
java-version: 21
35+
36+
# Setup Gradle
37+
- name: Setup Gradle
38+
uses: gradle/actions/setup-gradle@v4
39+
with:
40+
cache-read-only: true
41+
42+
# Build the plugin artifact
43+
- name: Build the Plugin
44+
env:
45+
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
46+
run: |
47+
./gradlew buildPlugin
48+
49+
# Upload an artifact as a release asset
50+
- name: Upload Release Asset
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*

.idea/dictionaries/project.xml

Lines changed: 35 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)