-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 646e928
Showing
5 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Set the base image. | ||
FROM gradle:jdk11 | ||
|
||
# Download the plugin verifier. | ||
RUN curl -L --output /verifier.jar https://dl.bintray.com/jetbrains/intellij-plugin-service/org/jetbrains/intellij/plugins/verifier-cli/1.222/verifier-cli-1.222-all.jar | ||
|
||
# Copy the initialisation script. | ||
COPY docker-entrypoint.sh /usr/bin/entrypoint.sh | ||
RUN chmod +x /usr/bin/entrypoint.sh | ||
ENTRYPOINT entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Pieter De Clercq | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# IntelliJ Plugin Verifier GitHub Action | ||
|
||
Use GitHub Actions to verify the compatibility of your IntelliJ plugin against any version of IntelliJ IDEA. | ||
|
||
## Usage | ||
|
||
Simply add the action to your workflow-file and specify the path to your plugin, as well as the desired version of IntelliJ IDEA to test, as shown in hte example: | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: thepieterdc/intellij-plugin-verifier-action@v1.0.0 | ||
with: | ||
plugin: '/path/to/plugin.zip' | ||
version: '181.5684.4' | ||
``` | ||
## Arguments | ||
This action currently requires 2 arguments: | ||
| Input | Description | Usage | | ||
| :---: | :---: | :---: | | ||
| `plugin` | The path to the `zip`-distribution of the plugin, generated by executing `./gradlew buildPlugin` | *Required* | | ||
| `version` | Release of IntelliJ that should be used to validate against | *Required* | | ||
|
||
## Example | ||
The following example builds a plugin using Gradle, and validates it against IDEA build `193.5662.53`. | ||
|
||
```yaml | ||
name: Plugin compatibility | ||
on: [push] | ||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Setup Java | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11.x.x | ||
- name: Build the plugin using Gradle | ||
run: ./gradlew buildPlugin | ||
- uses: thepieterdc/intellij-plugin-verifier-action@v1.0.0 | ||
with: | ||
plugin: '/home/runner/work/demo-plugin/demo-plugin/build/distributions/demo-plugin-1.0.0-SNAPSHOT.zip' | ||
version: '193.5662.53' | ||
``` | ||
## Contributing | ||
|
||
Contributions are always appreciated in the form of pull requests/issues. | ||
|
||
## License | ||
|
||
The code in this project is released under the [MIT License](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'IntelliJ Plugin Verifier' | ||
description: 'GitHub Action that verifies plugin compatibility with any version of IntelliJ IDEA.' | ||
author: 'Pieter De Clercq <@thepieterdc>' | ||
inputs: | ||
plugin: | ||
description: 'Path to the plugin distribution zip file' | ||
required: true | ||
version: | ||
description: 'The version of IntelliJ that should be validated against' | ||
required: true | ||
branding: | ||
color: 'green' | ||
icon: 'check-circle' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.plugin }} | ||
- ${{ inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
set -eu | ||
|
||
# Create a directory to store the IDEs in. | ||
mkdir -p /ides | ||
|
||
# Download the required IntelliJ version. | ||
curl -L --output "idea-$INPUT_VERSION.zip" "https://www.jetbrains.com/intellij-repository/releases/com/jetbrains/intellij/idea/ideaIU/$INPUT_VERSION/ideaIU-$INPUT_VERSION.zip" | ||
|
||
# Extract the zip. | ||
unzip -d "/ides/$INPUT_VERSION" "idea-$INPUT_VERSION.zip" | ||
|
||
# Set the correct JAVA_HOME path in case this is overwritten by a setup-java action. | ||
JAVA_HOME="/opt/java/openjdk" | ||
|
||
# Execute the verifier. | ||
echo "Running verification..." | ||
java -jar /verifier.jar check-plugin "$INPUT_PLUGIN" "/ides/$INPUT_VERSION" 2>&1 > "log-$INPUT_VERSION.txt" | ||
|
||
# Output the log | ||
cat "log-$INPUT_VERSION.txt" | ||
|
||
# Validate the log | ||
egrep "^Plugin (.*) against .*: Compatible$" "log-$INPUT_VERSION.txt" |