diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17a3cf24..a15bed6f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ concurrency: jobs: - # Prepare environment and build the plugin + # Prepare the environment and build the plugin build: name: Build runs-on: ubuntu-latest @@ -38,78 +38,60 @@ jobs: # Check out the current repository - name: Fetch Sources - uses: actions/checkout@v4 + uses: actions/checkout@v6 - # 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 + uses: actions/setup-java@v5 with: distribution: zulu java-version: 21 # Setup Gradle - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 - - # 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 + uses: gradle/actions/setup-gradle@v6 # Build plugin - name: Build plugin run: ./gradlew buildPlugin - # Prepare plugin archive content for creating artifact - - name: Prepare Plugin Artifact - id: artifact - shell: bash - run: | - cd ${{ github.workspace }}/build/distributions - FILENAME=`ls *.zip` - unzip "$FILENAME" -d content - - 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 + uses: actions/upload-artifact@v7 with: - name: ${{ steps.artifact.outputs.filename }} - path: ./build/distributions/content/*/* + name: plugin-distribution + path: ./build/distributions/*.zip - # Run tests and upload a code coverage report + # Run tests and upload test reports on failure test: name: Test needs: [ build ] runs-on: ubuntu-latest steps: + # 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 + uses: actions/checkout@v6 - # 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 + uses: actions/setup-java@v5 with: distribution: zulu java-version: 21 # Setup Gradle - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 + uses: gradle/actions/setup-gradle@v6 + with: + cache-read-only: true # Run tests - name: Run Tests @@ -118,7 +100,7 @@ jobs: # Collect Tests Result of failed tests - name: Collect Tests Result if: ${{ failure() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: tests-result path: ${{ github.workspace }}/build/reports/tests @@ -132,41 +114,36 @@ 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 the current repository - name: Fetch Sources - uses: actions/checkout@v4 + uses: actions/checkout@v6 - # 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 + uses: actions/setup-java@v5 with: distribution: zulu java-version: 21 # Setup Gradle - name: Setup Gradle - uses: gradle/actions/setup-gradle@v4 - - # Cache Plugin Verifier IDEs - - name: Setup Plugin Verifier IDEs Cache - uses: actions/cache@v4 + uses: gradle/actions/setup-gradle@v6 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 verifyPlugin -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }} + run: ./gradlew verifyPlugin # Collect Plugin Verifier Result - name: Collect Plugin Verifier Result if: ${{ always() }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: pluginVerifier-result path: ${{ github.workspace }}/build/reports/pluginVerifier diff --git a/.run/Run Tests.run.xml b/.run/Run Tests.run.xml index 2511d17a..40828431 100644 --- a/.run/Run Tests.run.xml +++ b/.run/Run Tests.run.xml @@ -11,15 +11,18 @@