diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a084c1..fc9be04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,54 +26,33 @@ concurrency: jobs: - # Prepare environment and build the plugin + # Prepare the environment and build the plugin build: name: Build runs-on: ubuntu-latest - outputs: - version: ${{ steps.properties.outputs.version }} - changelog: ${{ steps.properties.outputs.changelog }} - pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }} steps: - # Check out current repository + # Free GitHub Actions Environment Disk Space + - name: Maximize Build Space + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + large-packages: false + + # Check out the current repository - name: Fetch Sources uses: actions/checkout@v4 - # Validate wrapper - - name: Gradle Wrapper Validation - uses: gradle/wrapper-validation-action@v2 - - # Set up Java environment for the next steps + # Set up the Java environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: distribution: zulu - java-version: 17 + java-version: 21 # Setup Gradle - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - with: - gradle-home-cache-cleanup: true - - # Set environment variables - - name: Export Properties - id: properties - shell: bash - run: | - PROPERTIES="$(./gradlew properties --console=plain -q)" - VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" - CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" - - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT - - echo "changelog<> $GITHUB_OUTPUT - echo "$CHANGELOG" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - ./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier + uses: gradle/actions/setup-gradle@v4 # Build plugin - name: Build plugin @@ -90,7 +69,7 @@ jobs: echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT - # Store already-built plugin as an artifact for downloading + # Store an already-built plugin as an artifact for downloading - name: Upload artifact uses: actions/upload-artifact@v4 with: @@ -104,22 +83,29 @@ jobs: runs-on: ubuntu-latest steps: - # Check out current repository + # Free GitHub Actions Environment Disk Space + - name: Maximize Build Space + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + large-packages: false + + # Check out the current repository - name: Fetch Sources uses: actions/checkout@v4 - # Set up Java environment for the next steps + # Set up the Java environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: distribution: zulu - java-version: 17 + java-version: 21 # Setup Gradle - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 with: - gradle-home-cache-cleanup: true + cache-read-only: true # Run tests - name: Run Tests @@ -135,11 +121,12 @@ jobs: # Upload the Kover report to CodeCov - name: Upload Code Coverage Report - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: files: ${{ github.workspace }}/build/reports/kover/report.xml + token: ${{ secrets.CODECOV_TOKEN }} - # Run Qodana inspections and provide report + # Run Qodana inspections and provide a report inspectCode: name: Inspect code needs: [ build ] @@ -152,25 +139,28 @@ jobs: # Free GitHub Actions Environment Disk Space - name: Maximize Build Space - uses: jlumbroso/free-disk-space@main + uses: jlumbroso/free-disk-space@v1.3.1 with: tool-cache: false large-packages: false - # Check out current repository + # Check out the current repository - name: Fetch Sources uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit + fetch-depth: 0 # a full history is required for pull request analysis - # Set up Java environment for the next steps + # Set up the Java environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: distribution: zulu - java-version: 17 + java-version: 21 # Run Qodana inspections - name: Qodana - Code Inspection - uses: JetBrains/qodana-action@v2023.3.1 + uses: JetBrains/qodana-action@v2025.1.1 with: cache-default-branch-only: true @@ -183,38 +173,31 @@ jobs: # Free GitHub Actions Environment Disk Space - name: Maximize Build Space - uses: jlumbroso/free-disk-space@main + uses: jlumbroso/free-disk-space@v1.3.1 with: tool-cache: false large-packages: false - # Check out current repository + # Check out the current repository - name: Fetch Sources uses: actions/checkout@v4 - # Set up Java environment for the next steps + # Set up the Java environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: distribution: zulu - java-version: 17 + java-version: 21 # Setup Gradle - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 with: - gradle-home-cache-cleanup: true - - # Cache Plugin Verifier IDEs - - name: Setup Plugin Verifier IDEs Cache - uses: actions/cache@v4 - with: - path: ${{ needs.build.outputs.pluginVerifierHomeDir }}/ides - key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }} + cache-read-only: true # Run Verify Plugin task and IntelliJ Plugin Verifier tool - name: Run Plugin Verification tasks - run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }} + run: ./gradlew verifyPlugin # Collect Plugin Verifier Result - name: Collect Plugin Verifier Result @@ -225,7 +208,7 @@ jobs: path: ${{ github.workspace }}/build/reports/pluginVerifier # Prepare a draft release for GitHub Releases page for the manual verification - # If accepted and published, release workflow would be triggered + # If accepted and published, the release workflow would be triggered releaseDraft: name: Release draft if: github.event_name != 'pull_request' @@ -235,7 +218,7 @@ jobs: contents: write steps: - # Check out current repository + # Check out the current repository - name: Fetch Sources uses: actions/checkout@v4 @@ -253,10 +236,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - gh release create "v${{ needs.build.outputs.version }}" \ + VERSION=$(./gradlew properties --property version --quiet --console=plain | tail -n 1 | cut -f2- -d ' ') + RELEASE_NOTE="./build/tmp/release_note.txt" + ./gradlew getChangelog --unreleased --no-header --quiet --console=plain --output-file=$RELEASE_NOTE + + gh release create $VERSION \ --draft \ - --title "v${{ needs.build.outputs.version }}" \ - --notes "$(cat << 'EOM' - ${{ needs.build.outputs.changelog }} - EOM - )" \ No newline at end of file + --title $VERSION \ + --notes-file $RELEASE_NOTE \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4898779..d0fb6bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,5 @@ # GitHub Actions Workflow created for handling the release process based on the draft release prepared with the Build workflow. -# Running the publishPlugin task requires all following secrets to be provided: PUBLISH_TOKEN, PRIVATE_KEY, PRIVATE_KEY_PASSWORD, CERTIFICATE_CHAIN. +# Running the publishPlugin task requires all the following secrets to be provided: PUBLISH_TOKEN, PRIVATE_KEY, PRIVATE_KEY_PASSWORD, CERTIFICATE_CHAIN. # See https://plugins.jetbrains.com/docs/intellij/plugin-signing.html for more information. name: Release @@ -18,46 +18,43 @@ jobs: pull-requests: write steps: - # Check out current repository + # Free GitHub Actions Environment Disk Space + - name: Maximize Build Space + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + large-packages: false + + # Check out the current repository - name: Fetch Sources uses: actions/checkout@v4 with: ref: ${{ github.event.release.tag_name }} - # Set up Java environment for the next steps + # Set up the Java environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: distribution: zulu - java-version: 17 + java-version: 21 # Setup Gradle - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 with: - gradle-home-cache-cleanup: true + cache-read-only: true - # Set environment variables - - name: Export Properties - id: properties - shell: bash - run: | - CHANGELOG="$(cat << 'EOM' | sed -e 's/^[[:space:]]*$//g' -e '/./,$!d' - ${{ github.event.release.body }} - EOM - )" - - echo "changelog<> $GITHUB_OUTPUT - echo "$CHANGELOG" >> $GITHUB_OUTPUT - echo "EOF" >> $GITHUB_OUTPUT - - # Update Unreleased section with the current release note + # Update the Unreleased section with the current release note - name: Patch Changelog - if: ${{ steps.properties.outputs.changelog != '' }} + if: ${{ github.event.release.body != '' }} env: - CHANGELOG: ${{ steps.properties.outputs.changelog }} + CHANGELOG: ${{ github.event.release.body }} run: | - ./gradlew patchChangelog --release-note="$CHANGELOG" + RELEASE_NOTE="./build/tmp/release_note.txt" + mkdir -p "$(dirname "$RELEASE_NOTE")" + echo "$CHANGELOG" > $RELEASE_NOTE + + ./gradlew patchChangelog --release-note-file=$RELEASE_NOTE # Publish the plugin to JetBrains Marketplace - name: Publish Plugin @@ -68,7 +65,7 @@ jobs: PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }} run: ./gradlew publishPlugin - # Upload artifact as a release asset + # Upload an artifact as a release asset - name: Upload Release Asset env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/run-ui-tests.yml b/.github/workflows/run-ui-tests.yml index b756fd6..f35329c 100644 --- a/.github/workflows/run-ui-tests.yml +++ b/.github/workflows/run-ui-tests.yml @@ -31,22 +31,22 @@ jobs: steps: - # Check out current repository + # Check out the current repository - name: Fetch Sources uses: actions/checkout@v4 - # Set up Java environment for the next steps + # Set up the Java environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: distribution: zulu - java-version: 17 + java-version: 21 # Setup Gradle - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 + uses: gradle/actions/setup-gradle@v4 with: - gradle-home-cache-cleanup: true + cache-read-only: true # Run IDEA prepared for UI testing - name: Run IDE @@ -54,7 +54,7 @@ jobs: # Wait for IDEA to be started - name: Health Check - uses: jtalk/url-health-check-action@v3 + uses: jtalk/url-health-check-action@v4 with: url: http://127.0.0.1:8082 max-attempts: 15 diff --git a/.gitignore b/.gitignore index 61032ef..b9038ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ +.DS_Store .gradle .idea +.intellijPlatform +.kotlin .qodana build \ No newline at end of file diff --git a/.run/Run IDE for UI Tests.run.xml b/.run/Run IDE for UI Tests.run.xml deleted file mode 100644 index f31f6d5..0000000 --- a/.run/Run IDE for UI Tests.run.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - true - true - false - false - - - \ No newline at end of file diff --git a/.run/Run Plugin.run.xml b/.run/Run Plugin.run.xml index f42721a..0709c6f 100644 --- a/.run/Run Plugin.run.xml +++ b/.run/Run Plugin.run.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.run/Run Qodana.run.xml b/.run/Run Qodana.run.xml deleted file mode 100644 index 732dcfa..0000000 --- a/.run/Run Qodana.run.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - true - true - false - false - - - \ No newline at end of file diff --git a/.run/Run Tests.run.xml b/.run/Run Tests.run.xml index 1c1be17..55da723 100644 --- a/.run/Run Tests.run.xml +++ b/.run/Run Tests.run.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/.run/Run Verifications.run.xml b/.run/Run Verifications.run.xml index 1c1be17..1a22fef 100644 --- a/.run/Run Verifications.run.xml +++ b/.run/Run Verifications.run.xml @@ -11,7 +11,7 @@