Skip to content

Commit

Permalink
Main branch is created
Browse files Browse the repository at this point in the history
Signed-off-by: Uladzislau <[email protected]>
  • Loading branch information
KUGDev committed Jul 18, 2024
2 parents ebd6998 + f826696 commit 9d59334
Show file tree
Hide file tree
Showing 166 changed files with 5,969 additions and 1,869 deletions.
64 changes: 54 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,18 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
product: ["IC-231","IC-233"]
include:
- product: "IC-231"
distribution: "zulu"
java: "17"
- product: "IC-233"
distribution: "zulu"
java: "17"
max-parallel: 10
fail-fast: false
outputs:
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
steps:
Expand All @@ -32,8 +44,8 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
Expand All @@ -48,6 +60,7 @@ jobs:
id: properties
env:
AUTO_SNAPSHOT_VERSION: false
PRODUCT_NAME: ${{ matrix.product }}
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
Expand All @@ -60,6 +73,8 @@ jobs:
- name: Build plugin
shell: bash
run: ./gradlew buildPlugin
env:
PRODUCT_NAME: ${{ matrix.product }}

- name: Prepare Plugin Artifact
id: artifact
Expand All @@ -81,6 +96,18 @@ jobs:
test_and_sonar:
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
product: ["IC-231","IC-233"]
include:
- product: "IC-231"
distribution: "zulu"
java: "17"
- product: "IC-233"
distribution: "zulu"
java: "17"
max-parallel: 10
fail-fast: false
steps:

- name: Checkout the plugin GitHub repository
Expand All @@ -89,8 +116,8 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
Expand All @@ -100,17 +127,19 @@ jobs:
- name: Run tests
shell: bash
run: ./gradlew test
env:
PRODUCT_NAME: ${{ matrix.product }}

- name: Publish tests result to artifacts
uses: actions/upload-artifact@v4
with:
name: tests-report
name: tests-report-${{ matrix.product }}
path: ${{ github.workspace }}/build/reports/tests

- name: Publish code coverage report to artifacts
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
name: code-coverage-report-${{ matrix.product }}
path: ${{ github.workspace }}/build/reports/kover/html

- name: SonarCloud scans
Expand All @@ -120,11 +149,24 @@ jobs:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
PRODUCT_NAME: ${{ matrix.product }}

verify:
if: ${{ contains(github.ref, 'refs/heads/release/') }}
if: ${{ contains(github.ref, 'refs/heads/release/') || contains(github.ref, 'refs/heads/main') }}
needs: [build]
runs-on: ubuntu-latest
strategy:
matrix:
product: ["IC-231","IC-233"]
include:
- product: "IC-231"
distribution: "zulu"
java: "17"
- product: "IC-233"
distribution: "zulu"
java: "17"
max-parallel: 10
fail-fast: false
steps:

- name: Maximize Build Space
Expand All @@ -139,8 +181,8 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
Expand All @@ -157,9 +199,11 @@ jobs:
continue-on-error: true
shell: bash
run: ./gradlew runPluginVerifier -Dplugin.verifier.home.dir=${{ needs.build.outputs.pluginVerifierHomeDir }}
env:
PRODUCT_NAME: ${{ matrix.product }}

- name: Collect Plugin Verifier Result
uses: actions/upload-artifact@v4
with:
name: plugin-verifier-report
name: plugin-verifier-report-${{ matrix.product }}
path: ${{ github.workspace }}/build/reports/pluginVerifier
94 changes: 71 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
workflow_dispatch:

jobs:
release:
changelog-and-preparations:
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
distribution: "zulu"
java-version: 17

- name: Setup Gradle
Expand All @@ -44,20 +44,12 @@ jobs:
PLUGIN_VERSION_FULL="$(echo "$PROPERTIES" | grep "^pluginVersion:" | cut -f2- -d ' ')"
CURR_COMMIT="$(git rev-parse HEAD)"
echo "pluginVersionFull: $PLUGIN_VERSION_FULL"
echo "pluginVersionSemVer: $PLUGIN_VERSION_FULL"
echo "currCommit: $CURR_COMMIT"
echo "pluginVersionFull=$PLUGIN_VERSION_FULL" >> $GITHUB_OUTPUT
echo "pluginVersionSemVer=$PLUGIN_VERSION_FULL" >> $GITHUB_OUTPUT
echo "currCommit=$CURR_COMMIT" >> $GITHUB_OUTPUT
- name: Publish Plugin
env:
ZOWE_INTELLIJ_MARKET_TOKEN: ${{ secrets.ZOWE_INTELLIJ_MARKET_TOKEN }}
INTELLIJ_SIGNING_CERTIFICATE_CHAIN: ${{ secrets.INTELLIJ_SIGNING_CERTIFICATE_CHAIN }}
INTELLIJ_SIGNING_PRIVATE_KEY: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY }}
INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD }}
run: ./gradlew publishPlugin

- name: Prepare release notes
id: release_notes
shell: bash
Expand All @@ -75,23 +67,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag ${{ steps.properties.outputs.pluginVersionFull }}
git push origin ${{ steps.properties.outputs.pluginVersionFull }}
gh release create ${{ steps.properties.outputs.pluginVersionFull }} --title ${{ steps.properties.outputs.pluginVersionFull }} --target ${{ steps.properties.outputs.currCommit }} -F- <<EOF
git tag ${{ steps.properties.outputs.pluginVersionSemVer }}
git push origin ${{ steps.properties.outputs.pluginVersionSemVer }}
gh release create ${{ steps.properties.outputs.pluginVersionSemVer }} --title ${{ steps.properties.outputs.pluginVersionSemVer }} --target ${{ steps.properties.outputs.currCommit }} -F- <<EOF
${{ steps.release_notes.outputs.version_release_notes }}
EOF
- name: Upload Release Built Artifact
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.properties.outputs.pluginVersionFull }} ./build/distributions/*

- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ steps.properties.outputs.pluginVersionFull }}"
VERSION="${{ steps.properties.outputs.pluginVersionSemVer }}"
BRANCH="release-changelog-update-$VERSION"
git config user.email "[email protected]"
Expand All @@ -113,5 +99,67 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api repos/{owner}/{repo}/milestones \
--jq '.[] | select(.title == "${{ steps.properties.outputs.pluginVersionFull }}") | .number' \
--jq '.[] | select(.title == "${{ steps.properties.outputs.pluginVersionSemVer }}") | .number' \
| xargs -I '{}' gh api -X PATCH repos/{owner}/{repo}/milestones/{} -F state='closed'
release:
runs-on: ubuntu-latest
strategy:
matrix:
product: ["IC-231","IC-233"]
include:
- product: "IC-231"
distribution: "zulu"
java: "17"
- product: "IC-233"
distribution: "zulu"
java: "17"
max-parallel: 10
fail-fast: false
steps:

- name: Checkout the plugin GitHub repository
uses: actions/checkout@v4

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true

- name: Fetch Gradle properties for a specific product
id: properties
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
PLUGIN_VERSION_FULL="$(echo "$PROPERTIES" | grep "^pluginVersion:" | cut -f2- -d ' ')-$PRODUCT_NAME"
CURR_COMMIT="$(git rev-parse HEAD)"
echo "pluginVersionFull: $PLUGIN_VERSION_FULL"
echo "currCommit: $CURR_COMMIT"
echo "pluginVersionFull=$PLUGIN_VERSION_FULL" >> $GITHUB_OUTPUT
echo "currCommit=$CURR_COMMIT" >> $GITHUB_OUTPUT
- name: Publish Plugin
env:
INTELLIJ_SIGNING_PUBLISH_TOKEN: ${{ secrets.INTELLIJ_SIGNING_PUBLISH_TOKEN }}
INTELLIJ_SIGNING_CERTIFICATE_CHAIN: ${{ secrets.INTELLIJ_SIGNING_CERTIFICATE_CHAIN }}
INTELLIJ_SIGNING_PRIVATE_KEY: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY }}
INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.INTELLIJ_SIGNING_PRIVATE_KEY_PASSWORD }}
PRODUCT_NAME: ${{ matrix.product }}
run: ./gradlew publishPlugin

- name: Upload Release Built Artifact
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.properties.outputs.pluginVersionFull }} ./build/distributions/*
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,31 @@ All notable changes to the Zowe™ Explorer plug-in for IntelliJ IDEA™ will be

## [Unreleased]

## [1.2.1-231] (2024-06-12)

### Features
* Feature: GitHub issue #182 ([4631d76f](https://github.com/zowe/zowe-explorer-intellij/commit/4631d76f))
* Feature: Change dialogs as DoNotAskOption is going to be removed soon ([0d6b5d57](https://github.com/zowe/zowe-explorer-intellij/commit/0d6b5d57))
* Feature: Add 'Unknown' to fields in dataset properties dialog when there is no information for fields ([5b32a4df](https://github.com/zowe/zowe-explorer-intellij/commit/5b32a4df))
* Feature: Validate owner when receiving information from TSO ([9db42fb8](https://github.com/zowe/zowe-explorer-intellij/commit/9db42fb8))
* Feature: Conflicts dialog on copy/move improvement ([c8f4d525](https://github.com/zowe/zowe-explorer-intellij/commit/c8f4d525))

### Bugfixes
* Bugfix: When all errors are corrected, the ok button is inactive ([4558495c](https://github.com/zowe/zowe-explorer-intellij/commit/4558495c))
* Bugfix: Rename of the opened file causes exception ([09453311](https://github.com/zowe/zowe-explorer-intellij/commit/09453311))
* Bugfix: Refresh does not work on the first try ([7af1c668](https://github.com/zowe/zowe-explorer-intellij/commit/7af1c668))
* Bugfix: "File Cache Conflict" when downloading file ([3f84b02a](https://github.com/zowe/zowe-explorer-intellij/commit/3f84b02a))
* Bugfix: Error opening an alias ([5b6ee654](https://github.com/zowe/zowe-explorer-intellij/commit/5b6ee654))
* Bugfix: Duplicate error messages ([c8ae8ddc](https://github.com/zowe/zowe-explorer-intellij/commit/c8ae8ddc))
* Bugfix: Rename file/folder to the same name causes exception ([3587a87b](https://github.com/zowe/zowe-explorer-intellij/commit/3587a87b))
* Bugfix: SyncAction: AWT events are not allowed inside write action ([796a6b9b](https://github.com/zowe/zowe-explorer-intellij/commit/796a6b9b))
* Bugfix: Warning dialog for downloading shows unnecessary scroll ([e7dc7427](https://github.com/zowe/zowe-explorer-intellij/commit/e7dc7427))
* Bugfix: Local cache conflict when overwriting local files ([f3039ac6](https://github.com/zowe/zowe-explorer-intellij/commit/f3039ac6))
* Bugfix: java.lang.RuntimeException: Cannot invoke (class=, method=onCacheUpdated, topic=cacheUpdated) ([2fedc7f5](https://github.com/zowe/zowe-explorer-intellij/commit/2fedc7f5))
* Bugfix: "Allocate like" action causes exception when refresh on mask is started ([d13a1c72](https://github.com/zowe/zowe-explorer-intellij/commit/d13a1c72))

## [1.2.0-231] (2024-04-16)

### Features

* Feature: GitHub issue #118: getActionUpdateThread function is overridden for each AnAction class inheritors ([639b60ee](https://github.com/zowe/zowe-explorer-intellij/commit/639b60ee))
Expand Down
40 changes: 34 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

This document is a living summary of conventions and best practices for development within Zowe™ Explorer plug-in for IntelliJ IDEA™.

- [General](#general)
- [Coding standards](#coding-standards)
- [Testing Guidelines](#testing-guidelines)
- [Branch Naming Guidelines](#branch-naming-guidelines)
- [Steps To Contribute](#steps-to-contribute)

## General
The following list describes general conventions for contributing to Zowe™ Explorer plug-in for IntelliJ IDEA™:
* Feel free to ask any questions related to the project or its components.
Expand Down Expand Up @@ -35,6 +41,27 @@ Our project follows the next coding rules:
- [Kotlin Coding Conventions](https://kotlinlang.org/docs/coding-conventions.html)
- [Java Coding Conventions](https://google.github.io/styleguide/javaguide.html)

## Testing Guidelines
To provide stable and reliable code, our project is regularly tested, either manually or through the automated test suite.
There are two types of tests, used in here:
- Unit-tests
- UI regression tests

Unit-tests are written using chain [Kotest](https://kotest.io/) + [MockK](https://mockk.io/) + [Kover](https://github.com/Kotlin/kotlinx-kover).
All the unit-tests are stored under [src/test](src/test/).
We use Kotest's `ShouldSpec` testing style to write our tests.
To provide mocked interfaces and semi-initialized IntelliJ platform's components during the tests execution time, there is a [WithApplicationShouldSpec](src/test/kotlin/eu/ibagroup/formainframe/testutils/WithApplicationShouldSpec.kt) abstract class. This class allows testers to mock out some services without the need to fully initialize them, and provides the IntelliJ application in a lightweight headless mode.
To see how we mock our services, investigate [this folder](src/test/kotlin/eu/ibagroup/formainframe/testutils/testServiceImpl/)
For more info on how to deal with tests in IntelliJ platform, refer to [this guide](https://plugins.jetbrains.com/docs/intellij/testing-plugins.html).

UI regression tests are written using chain [JUnit](https://junit.org/) + [IntellIJ UI test framework](https://github.com/JetBrains/intellij-ui-test-robot).
The UI tests are stored under [srv/uiTest](src/uiTest/).
These tests are too heavy to run after each build and are meant to run separately from the common development flow to make sure that there are no core-breaking changes to the plug-in's functionality.

***Important: These tests are running interactively. If you want to run the UI tests, consider do it on some other device or place, different from the main one where you are working. For these tests to run successfully, it is needed to exclude any other interactions with your device until they are finished to simulate all the actions, the same as user would do working with the plug-in.***

For the guides on how to run tests, see [this README section](README.md/#how-to-run-tests)

## Branch Naming Guidelines
This project follows the branching strategy:
- **main** - the main project branch with the latest stable code changes. It is changed as soon as the new version of the project is released.
Expand All @@ -55,11 +82,12 @@ Consider some new feature for the plugin. The first that you need is to create a
1. Create a fork of this repository
2. Create a branch using [Branch Naming Guidelines](#branch-naming-guidelines)
3. Make any changes you want
4. When you are ready, create an issue for your changes with "to be defined" label
5. Describe the issue:
4. Provide at least 80% of test coverage for all the new methods and their branches
5. When you are ready, create an issue for your changes with "to be defined" label
6. Describe the issue:
- In case of bug - make a reproduction scheme or short description on how to achieve this;
- In case of new feature or improvement - describe, what you are trying to implement, how it should work, and (if applicable) why it should be introduced in the plugin;
6. After the changes are made, create a pull request on any of the main branches in the project repo. ***It is not a problem if you specified an incorrect target branch, we will help you with it before the changes are pushed***
7. Assign Uladzislau Kalesnikau and Valiantsin Krus as reviewers to the pull request
8. Attach the issue to the pull request
9. Wait on the approval (thanks in advance)
7. After the changes are made, create a pull request on any of the main branches in the project repo. ***It is not a problem if you specified an incorrect target branch, we will help you with it before the changes are pushed***
8. Assign Uladzislau Kalesnikau as a reviewer to the pull request
9. Attach the issue to the pull request
10. Wait on the approval (thanks in advance)
Loading

0 comments on commit 9d59334

Please sign in to comment.