-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
29 changed files
with
1,361 additions
and
11 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,40 @@ | ||
name: Run E2E tests | ||
|
||
on: | ||
push: | ||
branches: [ fabrizio.scarponi/e2e-test ] | ||
|
||
jobs: | ||
run-e2e-tests: | ||
continue-on-error: true | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
# gradle-versions: [ '5.6.4', '6.9.2', '7.6.4', '8.6', 'latest' ] | ||
gradle-versions: [ '6.9.2', '8.6' ] | ||
name: Gradle ${{ matrix.gradle-versions }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: gradle/gradle-build-action@v2 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: | | ||
8 | ||
17 | ||
distribution: 'temurin' | ||
cache: gradle | ||
- name: Run Gradle tests | ||
env: | ||
GRADLE_VERSION: ${{ matrix.gradle-versions }} | ||
GRADLE_ENTERPRISE_KEY: ${{ secrets.GRADLE_ENTERPRISE_KEY }} | ||
run: ./gradlew :plugin:test | ||
- name: Upload test result | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: testResult | ||
path: /Users/runner/work/package-search-intellij-plugin/package-search-intellij-plugin/plugin/build/testData |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ out/ | |
*.iml | ||
.gradle/ | ||
.gitsubmoduleinit | ||
allure-results/ | ||
|
||
!.idea/codeStyles/* | ||
!.idea/dictionaries/* |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Binary file not shown.
Submodule package-search-api-models
updated
3 files
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
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
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
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
21 changes: 21 additions & 0 deletions
21
plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/tests/CoroutineAbstractCommand.kt
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 @@ | ||
package com.jetbrains.packagesearch.plugin.tests | ||
|
||
import com.intellij.openapi.components.Service | ||
import com.intellij.openapi.components.service | ||
import com.intellij.openapi.ui.playback.PlaybackContext | ||
import com.intellij.openapi.ui.playback.commands.AbstractCommand | ||
import kotlinx.coroutines.CoroutineScope | ||
import org.jetbrains.concurrency.Promise | ||
|
||
abstract class CoroutineAbstractCommand(text: String, line: Int) : AbstractCommand(text, line) { | ||
|
||
@Service(Service.Level.PROJECT) | ||
private class TestCoroutineScopeService(val coroutineScope: CoroutineScope) | ||
|
||
final override fun _execute(context: PlaybackContext): Promise<Any> = context.project | ||
.service<TestCoroutineScopeService>() | ||
.coroutineScope | ||
.promise { executeAsync(context) } | ||
|
||
abstract suspend fun executeAsync(context: PlaybackContext) | ||
} |
13 changes: 13 additions & 0 deletions
13
plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/tests/PKGSCommandProvider.kt
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,13 @@ | ||
package com.jetbrains.packagesearch.plugin.tests | ||
|
||
import com.jetbrains.packagesearch.plugin.tests.dumps.DumpPackageSearchModules | ||
import com.jetbrains.performancePlugin.CommandProvider | ||
|
||
class PKGSCommandProvider : CommandProvider { | ||
|
||
override fun getCommands() = mapOf( | ||
DumpPackageSearchModules.COMMAND | ||
) | ||
|
||
} | ||
|
13 changes: 13 additions & 0 deletions
13
plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/tests/SerializableIdentity.kt
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,13 @@ | ||
package com.jetbrains.packagesearch.plugin.tests | ||
|
||
import com.jetbrains.packagesearch.plugin.core.data.PackageSearchModule | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class SerializableIdentity( | ||
val group: String, | ||
val path: String, | ||
) | ||
|
||
|
||
fun PackageSearchModule.Identity.toSerializable() = SerializableIdentity(group, path) |
15 changes: 15 additions & 0 deletions
15
...tlin/com/jetbrains/packagesearch/plugin/tests/SerializablePackageSearchDeclaredPackage.kt
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,15 @@ | ||
package com.jetbrains.packagesearch.plugin.tests | ||
|
||
import com.jetbrains.packagesearch.plugin.core.extensions.DependencyDeclarationIndexes | ||
import kotlinx.serialization.Serializable | ||
import org.jetbrains.packagesearch.packageversionutils.normalization.NormalizedVersion | ||
|
||
@Serializable | ||
data class SerializablePackageSearchDeclaredPackage( | ||
val id: String, | ||
val displayName: String, | ||
val coordinates: String, | ||
val declaredVersion: NormalizedVersion?, | ||
val declarationIndexes: DependencyDeclarationIndexes, | ||
val declaredScope: String?, | ||
) |
45 changes: 45 additions & 0 deletions
45
...c/main/kotlin/com/jetbrains/packagesearch/plugin/tests/SerializablePackageSearchModule.kt
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,45 @@ | ||
package com.jetbrains.packagesearch.plugin.tests | ||
|
||
import com.jetbrains.packagesearch.plugin.core.data.PackageSearchModule | ||
import kotlinx.serialization.Serializable | ||
import org.jetbrains.packagesearch.api.v3.ApiRepository | ||
import org.jetbrains.packagesearch.api.v3.search.PackagesType | ||
|
||
@Serializable | ||
sealed interface SerializablePackageSearchModule { | ||
|
||
val name: String | ||
val identity: SerializableIdentity | ||
val buildFilePath: String? | ||
val declaredKnownRepositories: Map<String, ApiRepository> | ||
|
||
val compatiblePackageTypes: List<PackagesType> | ||
val dependencyMustHaveAScope: Boolean | ||
|
||
@Serializable | ||
data class Base( | ||
override val name: String, | ||
override val identity: SerializableIdentity, | ||
override val buildFilePath: String?, | ||
override val declaredKnownRepositories: Map<String, ApiRepository>, | ||
override val compatiblePackageTypes: List<PackagesType>, | ||
override val dependencyMustHaveAScope: Boolean, | ||
val declaredDependencies: List<SerializablePackageSearchDeclaredPackage>, | ||
val availableScopes: List<String>, | ||
val defaultScope: String?, | ||
) : SerializablePackageSearchModule | ||
|
||
@Serializable | ||
data class WithVariants( | ||
override val name: String, | ||
override val identity: SerializableIdentity, | ||
override val buildFilePath: String?, | ||
override val declaredKnownRepositories: Map<String, ApiRepository>, | ||
override val compatiblePackageTypes: List<PackagesType>, | ||
override val dependencyMustHaveAScope: Boolean, | ||
val variants: Map<String, SerializablePackageSearchModuleVariant>, | ||
val variantTerminology: PackageSearchModule.WithVariants.Terminology, | ||
val mainVariantName: String, | ||
) : SerializablePackageSearchModule | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
...kotlin/com/jetbrains/packagesearch/plugin/tests/SerializablePackageSearchModuleVariant.kt
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 @@ | ||
package com.jetbrains.packagesearch.plugin.tests | ||
|
||
import com.jetbrains.packagesearch.plugin.core.data.PackageSearchModule | ||
import com.jetbrains.packagesearch.plugin.core.data.PackageSearchModuleVariant | ||
import kotlinx.serialization.Serializable | ||
import org.jetbrains.packagesearch.api.v3.search.PackagesType | ||
|
||
@Serializable | ||
data class SerializablePackageSearchModuleVariant( | ||
val name: String, | ||
val variantTerminology: PackageSearchModule.WithVariants.Terminology?, | ||
val declaredDependencies: List<SerializablePackageSearchDeclaredPackage>, | ||
val attributes: List<PackageSearchModuleVariant.Attribute>, | ||
val compatiblePackageTypes: List<PackagesType>, | ||
val isPrimary: Boolean, | ||
val dependencyMustHaveAScope: Boolean, | ||
val availableScopes: List<String>, | ||
val defaultScope: String?, | ||
) |
17 changes: 17 additions & 0 deletions
17
plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/tests/SerializableThrowable.kt
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,17 @@ | ||
package com.jetbrains.packagesearch.plugin.tests | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class TestResult<T>( | ||
val value: T? = null, | ||
val error: SerializableThrowable? = null, | ||
) | ||
|
||
@Serializable | ||
data class SerializableThrowable( | ||
val typeName: String? = null, | ||
val message: String, | ||
val stackTrace: List<String>, | ||
val cause: SerializableThrowable? = null, | ||
) |
Oops, something went wrong.