Skip to content

Commit

Permalink
chore(skip-release): bump sinceIdea to IU-2022.3
Browse files Browse the repository at this point in the history
* bumped sinceIdea to IU-2022.3
* corrected GenericCompletionProviderTest.testTaskCompletionWithoutAnyInput to assert default completion

Signed-off-by: Andre Dietisheim <[email protected]>
  • Loading branch information
adietish committed Apr 16, 2024
1 parent 84f3d26 commit 4ad8dcb
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/IJ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
IJ: [IU-2022.2, IU-2022.3, IU-2023.1, IU-2023.2, , IU-2023.3]
IJ: [IU-2022.3, IU-2023.1, IU-2023.2, IU-2023.3, IU-2024.1]

steps:
- uses: actions/checkout@v2
Expand Down
19 changes: 2 additions & 17 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
buildscript {
/*
* for more complex conversion ideaVersion -> sinceIdeaBuild
* see https://github.com/rhdunn/xquery-intellij-plugin/blob/master/build.gradle#L1-L47
*/
def since = ideaVersion =~ /I.-20(\d\d)\.([1-3])(\.\d+)?$/
if (since.matches()) {
ext.sinceIdeaBuild = "${since.group(1)}${since.group(2)}".toInteger()
} else {
ext.sinceIdeaBuild = 0
}

if (ext.sinceIdeaBuild.toInteger() >= 223) {
ext.java_version = "17"
} else {
ext.java_version = "11"
}
ext.java_version = "17"
}


Expand All @@ -40,7 +25,7 @@ configurations {
}
}

def versionsMap = ['IU-2022.1':'221.5080.1', 'IU-2022.2':'222.3345.16', 'IU-2022.3':'223.7571.175', 'IU-2023.1':'231.8109.91', 'IU-2023.2':'232.8660.158', 'IU-2023.3':'233.11799.296']
def versionsMap = ['IU-2022.3':'223.7571.175', 'IU-2023.1':'231.8109.91', 'IU-2023.2':'232.8660.158', 'IU-2023.3':'233.11799.296', 'IU-2024.1':'241.14494.19']

intellij {
version = ideaVersion //for a full list of IntelliJ IDEA releases please see https://www.jetbrains.com/intellij-repository/releases
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ideaVersion=IU-2023.3
ideaVersion=IU-2024.1
projectVersion=1.4.2
jetBrainsToken=invalid
jetBrainsChannel=stable
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@


<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
<idea-version since-build="222"/>
<idea-version since-build="223"/>

<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
on how to target different products -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,14 @@
******************************************************************************/
package com.redhat.devtools.intellij.tektoncd.completion;

import com.intellij.openapi.application.ApplicationInfo;
import com.intellij.testFramework.PlatformLiteFixture;
import org.junit.Test;


import java.util.List;
import java.util.stream.Collectors;

import static com.intellij.testFramework.UsefulTestCase.assertOrderedEquals;
import static org.junit.Assert.assertTrue;

Expand Down Expand Up @@ -51,7 +56,12 @@ public void testPipelineCompletionWithTasksAndParams() {
/////////////////////////////////////////////////////////

public void testTaskCompletionWithoutAnyInput() {
assertTrue(getSuggestionsForFile("task1.yaml").isEmpty());
List<String> suggestions = getSuggestionsForFile("task1.yaml");
if (getIDEAVersion() >= 2024.1f) {
assertOrderedEquals(suggestions, "apiVersion"); // default completion returns 'apiVersion'
} else {
assertTrue(suggestions.isEmpty());
}
}

public void testTaskCompletionWithParams() {
Expand Down Expand Up @@ -87,4 +97,10 @@ public void testTaskCompletionWithWorkspaceSelected() {
public String getTestDataPath() {
return "src/test/resources/completion/generic";
}

private Float getIDEAVersion() {
String version = ApplicationInfo.getInstance().getFullVersion();
return Float.parseFloat(version);
}

}

0 comments on commit 4ad8dcb

Please sign in to comment.