diff --git a/.github/readme/intellij-platform-plugin-template-dark.svg b/.github/readme/intellij-platform-plugin-template-dark.svg new file mode 100644 index 0000000..55cd0c0 --- /dev/null +++ b/.github/readme/intellij-platform-plugin-template-dark.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.github/readme/intellij-platform-plugin-template-light.svg b/.github/readme/intellij-platform-plugin-template-light.svg new file mode 100644 index 0000000..f372ae0 --- /dev/null +++ b/.github/readme/intellij-platform-plugin-template-light.svg @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.github/template-cleanup/README.md b/.github/template-cleanup/README.md index 84fe9cb..3225efd 100644 --- a/.github/template-cleanup/README.md +++ b/.github/template-cleanup/README.md @@ -8,10 +8,11 @@ - [x] Create a new [IntelliJ Platform Plugin Template][template] project. - [ ] Get familiar with the [template documentation][template]. - [ ] Verify the [pluginGroup](./gradle.properties), [plugin ID](./src/main/resources/META-INF/plugin.xml) and [sources package](./src/main/kotlin). -- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html). +- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate). - [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time. - [ ] Set the Plugin ID in the above README badges. -- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html). +- [ ] Set the [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate) related [secrets](https://github.com/JetBrains/intellij-platform-plugin-template#environment-variables). +- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate). - [ ] Click the Watch button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes. diff --git a/.github/template-cleanup/gradle.properties b/.github/template-cleanup/gradle.properties index 74b981e..a02c72c 100644 --- a/.github/template-cleanup/gradle.properties +++ b/.github/template-cleanup/gradle.properties @@ -2,14 +2,15 @@ pluginGroup = %GROUP% pluginName = %NAME% +pluginRepositoryUrl = https://github.com/%REPOSITORY% # SemVer format -> https://semver.org pluginVersion = 0.0.1 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 213 -pluginUntilBuild = 222.* +pluginUntilBuild = 223.* -# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension +# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension platformType = IC platformVersion = 2021.3.3 @@ -23,3 +24,6 @@ gradleVersion = 7.5.1 # Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library # suppress inspection "UnusedProperty" kotlin.stdlib.default.dependency = false + +# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html +org.gradle.unsafe.configuration-cache = true diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1a2e38..141c9a4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: # Validate wrapper - name: Gradle Wrapper Validation - uses: gradle/wrapper-validation-action@v1.0.4 + uses: gradle/wrapper-validation-action@v1.0.5 # Setup Java 11 environment for the next steps - name: Setup Java @@ -77,7 +77,7 @@ jobs: # Run tests - name: Run Tests - run: ./gradlew test + run: ./gradlew check # Collect Tests Result of failed tests - name: Collect Tests Result @@ -87,6 +87,12 @@ jobs: name: tests-result path: ${{ github.workspace }}/build/reports/tests + # Upload Kover report to CodeCov + - name: Upload Code Coverage Report + uses: codecov/codecov-action@v3 + with: + files: ${{ github.workspace }}/build/reports/kover/xml/report.xml + # Cache Plugin Verifier IDEs - name: Setup Plugin Verifier IDEs Cache uses: actions/cache@v3 @@ -108,7 +114,7 @@ jobs: # Run Qodana inspections - name: Qodana - Code Inspection - uses: JetBrains/qodana-action@v2022.2.1 + uses: JetBrains/qodana-action@v2022.2.3 # Prepare plugin archive content for creating artifact - name: Prepare Plugin Artifact diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fb8f261..715d3f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -77,6 +77,7 @@ jobs: run: | VERSION="${{ github.event.release.tag_name }}" BRANCH="changelog-update-$VERSION" + LABEL="release changelog" git config user.email "action@github.com" git config user.name "GitHub Action" @@ -84,9 +85,13 @@ jobs: 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" \ + || true gh pr create \ --title "Changelog update - \`$VERSION\`" \ --body "Current pull request contains patched \`CHANGELOG.md\` file for the \`$VERSION\` version." \ - --base main \ + --label "$LABEL" \ --head $BRANCH diff --git a/.github/workflows/run-ui-tests.yml b/.github/workflows/run-ui-tests.yml index 1e4456d..363d9e8 100644 --- a/.github/workflows/run-ui-tests.yml +++ b/.github/workflows/run-ui-tests.yml @@ -48,7 +48,7 @@ jobs: # Wait for IDEA to be started - name: Health Check - uses: jtalk/url-health-check-action@v2 + uses: jtalk/url-health-check-action@v3 with: url: http://127.0.0.1:8082 max-attempts: 15 diff --git a/.github/workflows/template-cleanup.yml b/.github/workflows/template-cleanup.yml index 47c414b..6e246d7 100644 --- a/.github/workflows/template-cleanup.yml +++ b/.github/workflows/template-cleanup.yml @@ -5,18 +5,17 @@ name: Template Cleanup on: push: - branches: - - main + branches: [main] jobs: - # Run cleaning process only if workflow is triggered by the non-JetBrains/intellij-platform-plugin-template repository. + # Run cleaning process only if workflow is triggered by the non-"intellij-platform-plugin-template" repository. template-cleanup: name: Template Cleanup runs-on: ubuntu-latest + if: github.event.repository.name != 'intellij-platform-plugin-template' permissions: contents: write - if: github.event.repository.name != 'intellij-platform-plugin-template' steps: # Check out current repository @@ -59,6 +58,7 @@ jobs: .github/readme \ .github/template-cleanup \ .github/workflows/template-cleanup.yml \ + .github/workflows/template-verify.yml \ .idea/icon.png \ src/main/kotlin/org \ src/test/kotlin/org \ diff --git a/.github/workflows/template-verify.yml b/.github/workflows/template-verify.yml new file mode 100644 index 0000000..3fff541 --- /dev/null +++ b/.github/workflows/template-verify.yml @@ -0,0 +1,43 @@ +# GitHub Actions Workflow verifies if the template repository is consistent with all provided content. + +name: Template Verify +on: + # Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests) + push: + branches: [main] + paths: ['**/gradle.properties'] + # Trigger the workflow on any pull request + pull_request: + paths: ['**/gradle.properties'] + +jobs: + + build: + name: Template Verify + if: github.event.repository.name == 'intellij-platform-plugin-template' + runs-on: ubuntu-latest + outputs: + version: ${{ steps.properties.outputs.version }} + changelog: ${{ steps.properties.outputs.changelog }} + steps: + + # Check out current repository + - name: Fetch Sources + uses: actions/checkout@v3 + + # Compare `gradle.properties` with `.github/template-cleanup/gradle.properties` + - name: Verify gradle.properties + run: | + echo "\`\`\`diff" >> $GITHUB_STEP_SUMMARY + + diff -U 0 \ + -I '^pluginVersion' \ + -I '^pluginGroup' \ + -I '^pluginName' \ + -I '^pluginRepositoryUrl' \ + --label .github/template-cleanup/gradle.properties \ + --label gradle.properties \ + .github/template-cleanup/gradle.properties gradle.properties \ + >> $GITHUB_STEP_SUMMARY + + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY diff --git a/.run/Run Plugin Tests.run.xml b/.run/Run Plugin Tests.run.xml index ae9ae13..132d9ad 100644 --- a/.run/Run Plugin Tests.run.xml +++ b/.run/Run Plugin Tests.run.xml @@ -11,7 +11,7 @@