Skip to content

Commit

Permalink
Merge pull request #49 from Backbase/BEFOUND-1543-IntellijToolKit-Upg…
Browse files Browse the repository at this point in the history
…rade

2024.2 upgrade using intellijPlatform extension and Remove depricated/scheduled for removal  usage
  • Loading branch information
MalarsriA authored Oct 17, 2024
2 parents 64ec5ab + 9cb4aa6 commit f3b0f69
Show file tree
Hide file tree
Showing 49 changed files with 485 additions and 464 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ on:
# Trigger the workflow on any pull request
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
Expand All @@ -30,24 +34,24 @@ jobs:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.properties.outputs.version }}
filename: ${{ steps.artifact.outputs.filename }}
changelog: ${{ steps.properties.outputs.changelog }}
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4.2.0

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation[email protected]
uses: gradle/actions/wrapper-validation@v3

# Setup Java 17 environment for the next steps
# Setup Java 21 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
java-version: 21
cache: gradle

# Set environment variables
Expand All @@ -59,16 +63,13 @@ jobs:
VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')"
NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')"
CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)"
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=version::$VERSION"
echo "::set-output name=name::$NAME"
echo "::set-output name=changelog::$CHANGELOG"
echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier"
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
./gradlew printProductsReleases # prepare list of IDEs for Plugin Verifier
# Run tests
- name: Run Tests
Expand All @@ -77,7 +78,7 @@ jobs:
# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4.4.0
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests
Expand All @@ -98,12 +99,12 @@ jobs:

# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}
run: ./gradlew verifyPlugin -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }}

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4.4.0
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier
Expand All @@ -129,7 +130,7 @@ jobs:

# Store already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4.4.0
with:
name: ${{ steps.artifact.outputs.filename }}.zip
path: ./build/distributions/
Expand Down Expand Up @@ -157,7 +158,7 @@ jobs:
| xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{}
- name: Download build-output artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.filename }}.zip
path: ${{ github.workspace }}/build/distributions/
Expand Down
35 changes: 27 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,29 @@ jobs:
release:
name: Publish Plugin
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name }}

# Setup Java 11 environment for the next steps
# Setup Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
cache: gradle

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

# Set environment variables
- name: Export Properties
id: properties
Expand All @@ -38,11 +45,9 @@ jobs:
EOM
)"
CHANGELOG="${CHANGELOG//'%'/'%25'}"
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
echo "::set-output name=changelog::$CHANGELOG"
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# Update Unreleased section with the current release note
- name: Patch Changelog
Expand All @@ -56,24 +61,38 @@ jobs:
- name: Publish Plugin
env:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
run: ./gradlew publishPlugin

# Upload artifact as a release asset
- name: Upload Release Asset
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/*

# Create pull request
- name: Create Pull Request
if: ${{ steps.properties.outputs.changelog != '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew incrementVersion
VERSION="${{ github.event.release.tag_name }}"
BRANCH="changelog-update-$VERSION"
LABEL="release changelog"
git config user.email "[email protected]"
git config user.name "GitHub Action"
git checkout -b $BRANCH
git commit -am "Changelog update - $VERSION"
git push --set-upstream origin $BRANCH
gh label create "$LABEL" \
--description "Pull requests with release changelog update" \
--force \
|| true
gh pr create \
--title "Changelog update - \`$VERSION\`" \
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/run-ui-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# GitHub Actions Workflow for launching UI tests on Linux, Windows, and Mac in the following steps:
# - prepare and launch IDE with your plugin and robot-server plugin, which is needed to interact with UI
# - wait for IDE to start
# - run UI tests with separate Gradle task
# - Prepare and launch IDE with your plugin and robot-server plugin, which is needed to interact with the UI.
# - Wait for IDE to start.
# - Run UI tests with a separate Gradle task.
#
# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ Platform
# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ Platform.
#
# Workflow is triggered manually.

Expand Down Expand Up @@ -31,30 +31,33 @@ jobs:

steps:

# Check out current repository
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v2.4.0
uses: actions/checkout@v4

# Setup Java 17 environment for the next steps
# Set up Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
cache: gradle

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

# Run IDEA prepared for UI testing
- name: Run IDE
run: ${{ matrix.runIde }}

# Wait for IDEA to be started
- name: Health Check
uses: jtalk/url-health-check-action@v2
uses: jtalk/url-health-check-action@v4
with:
url: http://127.0.0.1:8082
max-attempts: 15
retry-delay: 30s

# Run tests
- name: Tests
run: ./gradlew test
run: ./gradlew test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.gradle
.idea
.qodana
.intellijPlatform
build
out
22 changes: 0 additions & 22 deletions .run/Run IDE for UI Tests.run.xml

This file was deleted.

3 changes: 2 additions & 1 deletion .run/Run IDE with Plugin.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="--debug" />
<option name="scriptParameters" value="--scan" />
<option name="taskDescriptions">
<list />
</option>
Expand All @@ -19,6 +19,7 @@
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
26 changes: 0 additions & 26 deletions .run/Run Plugin Verification.run.xml

This file was deleted.

26 changes: 0 additions & 26 deletions .run/Run Qodana.run.xml

This file was deleted.

25 changes: 25 additions & 0 deletions .run/Run Tests.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Tests" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="check" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>true</RunAsTest>
<method v="2" />
</configuration>
</component>
Loading

0 comments on commit f3b0f69

Please sign in to comment.