Skip to content
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
32bc33a
chore: update configuration from JB plugin template repo
AleksandrSl Jul 25, 2024
35a93e2
chore: update infrastructure
AleksandrSl Sep 24, 2025
d532ed0
chore: update versions to match template 2.4.0
AleksandrSl Dec 16, 2025
9bff5ec
feat: add support for new baseline and partially/fully supported queries
AleksandrSl Dec 16, 2025
4bb284c
feat: improve error recovery
AleksandrSl Dec 16, 2025
1734307
chore: add tests for error recovery
AleksandrSl Dec 16, 2025
361defd
feat: add injection into package.json
AleksandrSl Dec 17, 2025
97999dd
chore: remove resolved comment
AleksandrSl Dec 17, 2025
bc23ece
feat: add basic inspection for missing not dead
AleksandrSl Dec 18, 2025
1280cdb
chore: add tests for missing not dead inspection section constraints
AleksandrSl Dec 18, 2025
b49ecb9
feat: add code vision for stats
AleksandrSl Dec 19, 2025
6ef965c
fix: folding builder
AleksandrSl Dec 19, 2025
30a18e9
chore: relax parsing a lot since almost all the elements are not keyw…
AleksandrSl Dec 19, 2025
e7f08d9
feat: a bit of manual parsing for better error
AleksandrSl Dec 19, 2025
276f40e
fix: clarify reason for adding not dead
AleksandrSl Dec 19, 2025
7fbff89
chore: cleanup
AleksandrSl Dec 19, 2025
88f8d52
fix: deduplicate sections before analysis
AleksandrSl Dec 19, 2025
f010b15
chore: cleanup
AleksandrSl Dec 19, 2025
4e45f63
fix: make gradlew executable
AleksandrSl Dec 19, 2025
0558daf
fix: use existing methods in 2024.1
AleksandrSl Dec 19, 2025
045f9f8
chore: update changelog
AleksandrSl Dec 19, 2025
317d764
feat: remove generate parser task because it cannot generate methods …
AleksandrSl Dec 19, 2025
5f0713f
feat: update plugin name in gradle
AleksandrSl Dec 19, 2025
0489db1
feat: bump version once more
AleksandrSl Dec 19, 2025
1090d53
chore: rmeove unused code
AleksandrSl Dec 19, 2025
7e9c203
fix: remove useless comment tokens from parsing
AleksandrSl Dec 20, 2025
ca670c9
chore: update test snapshots
AleksandrSl Dec 20, 2025
149d1f1
fix: injection corner cases
AleksandrSl Dec 20, 2025
c8d13d3
chore: fix typos
AleksandrSl Dec 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
248 changes: 161 additions & 87 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,111 @@
# GitHub Actions Workflow is created for testing and preparing the plugin release in the following steps:
# - validate Gradle Wrapper,
# - run 'test' and 'verifyPlugin' tasks,
# - run Qodana inspections,
# - run 'buildPlugin' task and prepare artifact for the further tests,
# - run 'runPluginVerifier' task,
# - create a draft release.
# - Validate Gradle Wrapper.
# - Run 'test' and 'verifyPlugin' tasks.
# - Run Qodana inspections.
# - Run the 'buildPlugin' task and prepare artifact for further tests.
# - Run the 'runPluginVerifier' task.
# - Create a draft release.
#
# Workflow is triggered on push and pull_request events.
# The workflow is triggered on push and pull_request events.
#
# GitHub Actions reference: https://help.github.com/en/actions
#
## JBIJPPTPL

name: Build
on:
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g. for dependabot pull requests)
# 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]
branches: [ main ]
# 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
# Run verifyPlugin, IntelliJ Plugin Verifier, and test Gradle tasks
# Build plugin and provide the artifact for the next workflow jobs
# Prepare the environment and build the plugin
build:
name: Build
runs-on: ubuntu-latest
outputs:
version: ${{ steps.properties.outputs.version }}
changelog: ${{ steps.properties.outputs.changelog }}
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false

# Check out current repository
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v3
uses: actions/checkout@v5

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.0.5

# Setup Java 11 environment for the next steps
# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 11
java-version: 21

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

# Build plugin
- name: Build plugin
run: ./gradlew buildPlugin

# Set environment variables
- name: Export Properties
id: properties
# Prepare plugin archive content for creating artifact
- name: Prepare Plugin Artifact
id: artifact
shell: bash
run: |
PROPERTIES="$(./gradlew properties --console=plain -q)"
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)"
cd ${{ github.workspace }}/build/distributions
FILENAME=`ls *.zip`
unzip "$FILENAME" -d content

echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "name=$NAME" >> $GITHUB_OUTPUT
echo "pluginVerifierHomeDir=~/.pluginVerifier" >> $GITHUB_OUTPUT

echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT

./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
# Store an already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@v5
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*

# Run tests and upload a code coverage report
test:
name: Test
needs: [ build ]
runs-on: ubuntu-latest
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false

# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v5

# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v5
with:
distribution: zulu
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: true

# Run tests
- name: Run Tests
Expand All @@ -82,72 +114,113 @@ jobs:
# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v5
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Upload Kover report to CodeCov
# Upload the Kover report to CodeCov
- name: Upload Code Coverage Report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
files: ${{ github.workspace }}/build/reports/kover/xml/report.xml
files: ${{ github.workspace }}/build/reports/kover/report.xml
token: ${{ secrets.CODECOV_TOKEN }}

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v3
# Run Qodana inspections and provide a report
inspectCode:
name: Inspect code
needs: [ build ]
runs-on: ubuntu-latest
permissions:
contents: write
checks: write
pull-requests: write
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v1.3.1
with:
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
tool-cache: false
large-packages: false

# 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 }}
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@v3
# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v5
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier
distribution: zulu
java-version: 21

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/qodana-action@v2022.3.0
uses: JetBrains/qodana-action@v2025.1.1
with:
cache-default-branch-only: true

# Prepare plugin archive content for creating artifact
- name: Prepare Plugin Artifact
id: artifact
shell: bash
run: |
cd ${{ github.workspace }}/build/distributions
FILENAME=`ls *.zip`
unzip "$FILENAME" -d content
# Run plugin structure verification along with IntelliJ Plugin Verifier
verify:
name: Verify plugin
needs: [ build ]
runs-on: ubuntu-latest
steps:

echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT
# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: false
large-packages: false

# Store already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@v3
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v5

# Set up the Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v5
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*
distribution: zulu
java-version: 21

# Setup Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
with:
cache-read-only: true

# Run Verify Plugin task and IntelliJ Plugin Verifier tool
- name: Run Plugin Verification tasks
run: ./gradlew verifyPlugin

# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@v5
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier

# Prepare a draft release for GitHub Releases page for the manual verification
# If accepted and published, release workflow would be triggered
# If accepted and published, the release workflow would be triggered
releaseDraft:
name: Release Draft
name: Release draft
if: github.event_name != 'pull_request'
needs: build
needs: [ build, test, inspectCode, verify ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:

# Check out current repository
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v3
uses: actions/checkout@v5

# Remove old release drafts by using the curl request for the available releases with a draft flag
- name: Remove Old Release Drafts
Expand All @@ -163,10 +236,11 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ needs.build.outputs.version }} \
VERSION=$(./gradlew properties --property version --quiet --console=plain | tail -n 1 | cut -f2- -d ' ')
RELEASE_NOTE="./build/tmp/release_note.txt"
./gradlew getChangelog --unreleased --no-header --quiet --console=plain --output-file=$RELEASE_NOTE

gh release create $VERSION \
--draft \
--title "v${{ needs.build.outputs.version }}" \
--notes "$(cat << 'EOM'
${{ needs.build.outputs.changelog }}
EOM
)"
--title $VERSION \
--notes-file $RELEASE_NOTE
Loading
Loading