Skip to content

Commit e7761a1

Browse files
committed
intellij: pull template
1 parent 8be017f commit e7761a1

13 files changed

+187
-187
lines changed

.github/workflows/build.yml renamed to .github/workflows/intellij-build.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ on:
2222
paths:
2323
- "intellij/**"
2424

25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
27+
cancel-in-progress: true
28+
2529
jobs:
2630

2731
# Prepare environment and build the plugin
@@ -34,13 +38,13 @@ jobs:
3438
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
3539
steps:
3640

37-
# Check out current repository
41+
# Check out the current repository
3842
- name: Fetch Sources
3943
uses: actions/checkout@v4
4044

4145
# Validate wrapper
4246
- name: Gradle Wrapper Validation
43-
uses: gradle/wrapper-validation[email protected]
47+
uses: gradle/actions/wrapper-validation@v3
4448

4549
# Set up Java environment for the next steps
4650
- name: Setup Java
@@ -51,7 +55,7 @@ jobs:
5155

5256
# Setup Gradle
5357
- name: Setup Gradle
54-
uses: gradle/gradle-build-action@v2
58+
uses: gradle/actions/setup-gradle@v3
5559
with:
5660
gradle-home-cache-cleanup: true
5761

@@ -72,8 +76,6 @@ jobs:
7276
echo "$CHANGELOG" >> $GITHUB_OUTPUT
7377
echo "EOF" >> $GITHUB_OUTPUT
7478
75-
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
76-
7779
# Build plugin
7880
- name: Build plugin
7981
working-directory: ./intellij
@@ -92,7 +94,7 @@ jobs:
9294
9395
# Store already-built plugin as an artifact for downloading
9496
- name: Upload artifact
95-
uses: actions/upload-artifact@v3
97+
uses: actions/upload-artifact@v4
9698
with:
9799
name: ${{ steps.artifact.outputs.filename }}
98100
path: ./intellij/build/distributions/content/*/*
@@ -104,7 +106,7 @@ jobs:
104106
runs-on: ubuntu-latest
105107
steps:
106108

107-
# Check out current repository
109+
# Check out the current repository
108110
- name: Fetch Sources
109111
uses: actions/checkout@v4
110112

@@ -117,7 +119,7 @@ jobs:
117119

118120
# Setup Gradle
119121
- name: Setup Gradle
120-
uses: gradle/gradle-build-action@v2
122+
uses: gradle/actions/setup-gradle@v3
121123
with:
122124
gradle-home-cache-cleanup: true
123125

@@ -129,14 +131,14 @@ jobs:
129131
# Collect Tests Result of failed tests
130132
- name: Collect Tests Result
131133
if: ${{ failure() }}
132-
uses: actions/upload-artifact@v3
134+
uses: actions/upload-artifact@v4
133135
with:
134136
name: tests-result
135137
path: ${{ github.workspace }}/intellij/build/reports/tests
136138

137139
# Upload the Kover report to CodeCov
138140
- name: Upload Code Coverage Report
139-
uses: codecov/codecov-action@v3
141+
uses: codecov/codecov-action@v4
140142
with:
141143
files: ${{ github.workspace }}/intellij/build/reports/kover/report.xml
142144

@@ -158,7 +160,7 @@ jobs:
158160
tool-cache: false
159161
large-packages: false
160162

161-
# Check out current repository
163+
# Check out the current repository
162164
- name: Fetch Sources
163165
uses: actions/checkout@v4
164166

@@ -169,6 +171,11 @@ jobs:
169171
distribution: zulu
170172
java-version: 17
171173

174+
# Run Qodana inspections
175+
# - name: Qodana - Code Inspection
176+
# uses: JetBrains/[email protected]
177+
# with:
178+
# cache-default-branch-only: true
172179

173180
# Run plugin structure verification along with IntelliJ Plugin Verifier
174181
verify:
@@ -184,7 +191,7 @@ jobs:
184191
tool-cache: false
185192
large-packages: false
186193

187-
# Check out current repository
194+
# Check out the current repository
188195
- name: Fetch Sources
189196
uses: actions/checkout@v4
190197

@@ -197,26 +204,26 @@ jobs:
197204

198205
# Setup Gradle
199206
- name: Setup Gradle
200-
uses: gradle/gradle-build-action@v2
207+
uses: gradle/actions/setup-gradle@v3
201208
with:
202209
gradle-home-cache-cleanup: true
203210

204211
# Cache Plugin Verifier IDEs
205212
- name: Setup Plugin Verifier IDEs Cache
206-
uses: actions/cache@v3
213+
uses: actions/cache@v4
207214
with:
208215
path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides
209216
key: plugin-verifier-${{ hashFiles('intellij/build/listProductsReleases.txt') }}
210217

211218
# Run Verify Plugin task and IntelliJ Plugin Verifier tool
212219
- name: Run Plugin Verification tasks
213220
working-directory: ./intellij
214-
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
221+
run: ./gradlew verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
215222

216223
# Collect Plugin Verifier Result
217224
- name: Collect Plugin Verifier Result
218225
if: ${{ always() }}
219-
uses: actions/upload-artifact@v3
226+
uses: actions/upload-artifact@v4
220227
with:
221228
name: pluginVerifier-result
222229
path: ${{ github.workspace }}/intellij/build/reports/pluginVerifier
@@ -232,17 +239,10 @@ jobs:
232239
# contents: write
233240
# steps:
234241
#
235-
# # Check out current repository
242+
# # Check out the current repository
236243
# - name: Fetch Sources
237244
# uses: actions/checkout@v4
238245
#
239-
# # Set up Java environment for the next steps
240-
# - name: Setup Java
241-
# uses: actions/setup-java@v4
242-
# with:
243-
# distribution: zulu
244-
# java-version: 17
245-
#
246246
# # Remove old release drafts by using the curl request for the available releases with a draft flag
247247
# - name: Remove Old Release Drafts
248248
# env:
@@ -257,7 +257,7 @@ jobs:
257257
# env:
258258
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
259259
# run: |
260-
# gh release create v${{ needs.build.outputs.version }} \
260+
# gh release create "v${{ needs.build.outputs.version }}" \
261261
# --draft \
262262
# --title "v${{ needs.build.outputs.version }}" \
263263
# --notes "$(cat << 'EOM'

.github/workflows/release.yml renamed to .github/workflows/intellij-release.yml

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
pull-requests: write
2020
steps:
2121

22-
# Check out current repository
22+
# Check out the current repository
2323
- name: Fetch Sources
2424
uses: actions/checkout@v4
2525
with:
@@ -34,7 +34,7 @@ jobs:
3434

3535
# Setup Gradle
3636
- name: Setup Gradle
37-
uses: gradle/gradle-build-action@v2
37+
uses: gradle/actions/setup-gradle@v3
3838
with:
3939
gradle-home-cache-cleanup: true
4040

@@ -52,8 +52,9 @@ jobs:
5252
echo "$CHANGELOG" >> $GITHUB_OUTPUT
5353
echo "EOF" >> $GITHUB_OUTPUT
5454
55-
# Update Unreleased section with the current release note
55+
# Update the Unreleased section with the current release note
5656
- name: Patch Changelog
57+
working-directory: ./intellij
5758
if: ${{ steps.properties.outputs.changelog != '' }}
5859
env:
5960
CHANGELOG: ${{ steps.properties.outputs.changelog }}
@@ -62,6 +63,7 @@ jobs:
6263
6364
# Publish the plugin to JetBrains Marketplace
6465
- name: Publish Plugin
66+
working-directory: ./intellij
6567
env:
6668
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
6769
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
@@ -73,32 +75,32 @@ jobs:
7375
- name: Upload Release Asset
7476
env:
7577
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76-
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*
78+
run: gh release upload ${{ github.event.release.tag_name }} ./intellij/build/distributions/*
7779

7880
# Create a pull request
79-
- name: Create Pull Request
80-
if: ${{ steps.properties.outputs.changelog != '' }}
81-
env:
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83-
run: |
84-
VERSION="${{ github.event.release.tag_name }}"
85-
BRANCH="changelog-update-$VERSION"
86-
LABEL="release changelog"
87-
88-
git config user.email "[email protected]"
89-
git config user.name "GitHub Action"
90-
91-
git checkout -b $BRANCH
92-
git commit -am "Changelog update - $VERSION"
93-
git push --set-upstream origin $BRANCH
94-
95-
gh label create "$LABEL" \
96-
--description "Pull requests with release changelog update" \
97-
--force \
98-
|| true
99-
100-
gh pr create \
101-
--title "Changelog update - \`$VERSION\`" \
102-
--body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
103-
--label "$LABEL" \
104-
--head $BRANCH
81+
# - name: Create Pull Request
82+
# if: ${{ steps.properties.outputs.changelog != '' }}
83+
# env:
84+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
85+
# run: |
86+
# VERSION="${{ github.event.release.tag_name }}"
87+
# BRANCH="changelog-update-$VERSION"
88+
# LABEL="release changelog"
89+
#
90+
# git config user.email "[email protected]"
91+
# git config user.name "GitHub Action"
92+
#
93+
# git checkout -b $BRANCH
94+
# git commit -am "Changelog update - $VERSION"
95+
# git push --set-upstream origin $BRANCH
96+
#
97+
# gh label create "$LABEL" \
98+
# --description "Pull requests with release changelog update" \
99+
# --force \
100+
# || true
101+
#
102+
# gh pr create \
103+
# --title "Changelog update - \`$VERSION\`" \
104+
# --body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \
105+
# --label "$LABEL" \
106+
# --head $BRANCH

.github/workflows/run-ui-tests.yml renamed to .github/workflows/intellij-run-ui-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131

3232
steps:
3333

34-
# Check out current repository
34+
# Check out the current repository
3535
- name: Fetch Sources
3636
uses: actions/checkout@v4
3737

@@ -44,7 +44,7 @@ jobs:
4444

4545
# Setup Gradle
4646
- name: Setup Gradle
47-
uses: gradle/gradle-build-action@v2
47+
uses: gradle/actions/setup-gradle@v3
4848
with:
4949
gradle-home-cache-cleanup: true
5050

@@ -54,7 +54,7 @@ jobs:
5454

5555
# Wait for IDEA to be started
5656
- name: Health Check
57-
uses: jtalk/url-health-check-action@v3
57+
uses: jtalk/url-health-check-action@v4
5858
with:
5959
url: http://127.0.0.1:8082
6060
max-attempts: 15

.idea/vcs.xml

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

intellij/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.gradle
22
.idea
3+
.intellijPlatform
34
.qodana
45
build

intellij/.run/Run IDE for UI Tests.run.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

intellij/.run/Run Qodana.run.xml

Lines changed: 0 additions & 30 deletions
This file was deleted.

intellij/.run/Run Tests.run.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
2020
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
2121
<DebugAllEnabled>false</DebugAllEnabled>
22+
<RunAsTest>true</RunAsTest>
2223
<method v="2" />
2324
</configuration>
2425
</component>

0 commit comments

Comments
 (0)