From ffc58a38f614e8c7cd05a9cf9663c2d9b16cf330 Mon Sep 17 00:00:00 2001 From: Yurii Polek Date: Tue, 4 Jun 2024 22:57:28 +0300 Subject: [PATCH] test --- .github/workflows/build.yml | 47 +++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef3eb45..64ef713 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,6 +84,7 @@ jobs: version: ${{ steps.properties.outputs.version }} artifact: ${{ steps.properties.outputs.pluginName }}-${{ steps.properties.outputs.version }}.zip changelog: ${{ steps.properties.outputs.changelog }} + pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }} steps: # Check out current repository @@ -113,12 +114,15 @@ jobs: echo "::set-output name=version::$(./gradlew properties --console=plain -q | grep "^version:" | cut -f2- -d ' ')" echo "::set-output name=name::$(./gradlew properties --console=plain -q | grep "^name:" | cut -f2- -d ' ')" echo "::set-output name=pluginName::$(./gradlew properties --console=plain -q | grep "^pluginName:" | cut -f2- -d ' ')" + echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT CHANGELOG=$(./gradlew getChangelog --unreleased --no-header --console=plain -q) CHANGELOG="${CHANGELOG//'%'/'%25'}" CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" echo "::set-output name=changelog::$CHANGELOG" + + ./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier # Build artifact using buildPlugin Gradle task - name: Build Plugin @@ -131,6 +135,49 @@ jobs: name: plugin-artifact path: ./build/distributions/${{ needs.build.outputs.artifact }} + # Run plugin structure verification along with IntelliJ Plugin Verifier + verify2: + name: Verify plugin 2 + needs: build + runs-on: ubuntu-latest + steps: + + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v4 + + # Set up Java environment for the next steps + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + 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') }} + + # 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 }} + + # Collect Plugin Verifier Result + - name: Collect Plugin Verifier Result + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: pluginVerifier-result + path: ${{ github.workspace }}/build/reports/pluginVerifier + # Verify built plugin using IntelliJ Plugin Verifier tool # Requires build job to be passed verify: