Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
y-polek committed Jun 4, 2024
1 parent 4a62d2d commit ffc58a3
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down

0 comments on commit ffc58a3

Please sign in to comment.