Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 35 additions & 14 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,29 @@ jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
matrix:
java: [21]
distribution: [temurin]

steps:
- uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
cache: 'gradle'


- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-build-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-build-

- name: Build
run: ./gradlew build buildPlugin --info --stacktrace

Expand All @@ -48,7 +55,7 @@ jobs:
with:
name: test-reports-${{ matrix.java }}
path: build/reports/tests/test/**

- name: Check for uncommited changes
run: |
if [[ "$(git status --porcelain)" != "" ]]; then
Expand Down Expand Up @@ -78,21 +85,28 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
timeout-minutes: 15

strategy:
matrix:
java: [21]
distribution: [temurin]

steps:
- uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
cache: 'gradle'

- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-checkstyle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-checkstyle-

- name: Run Checkstyle
run: ./gradlew checkstyleMain checkstyleTest -PcheckstyleEnabled --stacktrace
Expand All @@ -101,25 +115,32 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
timeout-minutes: 15

strategy:
matrix:
java: [21]
distribution: [temurin]

steps:
- uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
cache: 'gradle'

- name: Run PMD
run: ./gradlew pmdMain pmdTest -PpmdEnabled --stacktrace

- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-pmd-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-pmd-

- name: Upload report
if: always()
uses: actions/upload-artifact@v4
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/check-ide-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check IDE Compatibility

on:
schedule:
- cron: '55 2 * * 1'
- cron: '55 8 * * 1'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -36,13 +36,23 @@ jobs:
sudo df -h
- uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21


- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-ide-compatibility-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-ide-compatibility-
- name: Check compatibility
run: ./gradlew verifyPlugin --info --stacktrace

Expand Down
38 changes: 23 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,26 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
cache: 'gradle'

- name: Try restore Gradle Cache
uses: actions/cache/restore@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-build-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-build-

- name: Build
run: ./gradlew build buildPlugin --info --stacktrace

- name: Check for uncommited changes
run: |
if [[ "$(git status --porcelain)" != "" ]]; then
Expand All @@ -51,12 +60,12 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v5

- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"

- name: UN-Snap version and output
id: version
run: |
Expand All @@ -71,15 +80,15 @@ jobs:

echo "Contents of gradle.properties"
cat gradle.properties

- name: Commit and Push
run: |
git add -A
git commit -m "Release ${{ steps.version.outputs.release }}"
git push origin
git tag v${{ steps.version.outputs.release }}
git push origin --tags

- name: Create Release
id: create_release
uses: shogo82148/actions-create-release@4661dc54f7b4b564074e9fbf73884d960de569a3 # v1
Expand All @@ -104,20 +113,19 @@ jobs:
timeout-minutes: 60
steps:
- uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'


- name: Init Git and pull
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git pull

- name: Publish Plugin
env:
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_MARKETPLACE_PUBLISH_TOKEN }}
Expand All @@ -138,20 +146,20 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v5

- name: Init Git and pull
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git pull

- name: Inc Version and SNAP root
run: |
originalVersion=$(grep -Po 'pluginVersion=\K.*' gradle.properties)
newVersion="$(echo $originalVersion | cut -d '-' -f1 | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{$NF=sprintf("%0*d", length($NF), ($NF+1)); print}')-SNAPSHOT"
echo "New version: $newVersion"
sed -i "s/pluginVersion=$originalVersion/pluginVersion=$newVersion/" gradle.properties

echo "Contents of gradle.properties"
cat gradle.properties

Expand All @@ -160,7 +168,7 @@ jobs:
git add -A
git commit -m "Preparing for next development iteration"
git push origin

- name: pull-request
env:
GH_TOKEN: ${{ github.token }}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ jobs:
with:
distribution: 'temurin'
java-version: 21
cache: 'gradle'


- name: Update/Generify version
run: |
originalVersion=$(grep -Po 'pluginVersion=\K.*' gradle.properties)
Expand All @@ -26,7 +25,7 @@ jobs:
echo "Contents of gradle.properties"
cat gradle.properties
- name: Publish Plugin
env:
PUBLISH_TOKEN: ${{ secrets.JETBRAINS_MARKETPLACE_PUBLISH_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'idea'
id 'checkstyle'
id 'pmd'
id 'org.jetbrains.intellij.platform' version '2.8.0'
id 'org.jetbrains.intellij.platform' version '2.9.0'
}

ext {
Expand Down