Skip to content

Commit

Permalink
tmp: run just one test class
Browse files Browse the repository at this point in the history
Signed-off-by: Jendrik Johannes <[email protected]>
  • Loading branch information
jjohannes committed Dec 11, 2024
1 parent ac3efdc commit fe5f220
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/flow-deploy-release-artifact.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
name: "Deploy Release Artifact"
on:
workflow_dispatch:
Expand All @@ -11,8 +12,8 @@ defaults:

env:
LC_ALL: C.UTF-8
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_PUBLISH_SECRET }}
GRADLE_CACHE_USERNAME: ${{ secrets.gradle-cache-username }}
GRADLE_CACHE_PASSWORD: ${{ secrets.gradle-cache-password }}

jobs:
plugin-portal-release:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/flow-pull-request-checks.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
name: "PR Checks"
on:
workflow_dispatch:
Expand All @@ -22,3 +23,6 @@ jobs:
build:
name: Code
uses: ./.github/workflows/zxc-build-plugins.yaml
secrets:
gradle-cache-username: ${{ secrets.GRADLE_CACHE_USERNAME }}
gradle-cache-password: ${{ secrets.GRADLE_CACHE_PASSWORD }}
15 changes: 8 additions & 7 deletions .github/workflows/zxc-build-plugins.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# SPDX-License-Identifier: Apache-2.0
name: "ZXC: Compile"
on:
workflow_call:
# secrets:
# gradle-cache-username:
# description: "The username used to authenticate with the Gradle Build Cache Node."
# required: true
# gradle-cache-password:
# description: "The password used to authenticate with the Gradle Build Cache Node."
# required: true
secrets:
gradle-cache-username:
description: "The username used to authenticate with the Gradle Build Cache Node."
required: true
gradle-cache-password:
description: "The password used to authenticate with the Gradle Build Cache Node."
required: true

defaults:
run:
Expand Down
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ gradlePlugin {
}

tasks.test {
include("**/*RustTasksTest.class")

// If success, delete all test projects
doLast { File("build/test-projects").deleteRecursively() }
}
Expand Down
8 changes: 6 additions & 2 deletions src/test/kotlin/org/hiero/gradle/test/RustTasksTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import org.assertj.core.api.Assertions.assertThat
import org.gradle.testkit.runner.TaskOutcome
import org.hiero.gradle.extensions.CargoToolchain
import org.hiero.gradle.test.fixtures.GradleProject
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test

class RustTasksTest {
Expand All @@ -25,10 +26,13 @@ class RustTasksTest {
name = "test"
version = "0.0.1"
edition = "2021"
[lib]
crate-type = ["cdylib"]
"""
.trimIndent()

@Test
@Disabled
fun `installRustToolchains installs all toolchains defined in CargoToolchain`() {
val p = GradleProject().withMinimalStructure()
val rustToolchainsDir = p.file("product/module-a/build/rust-toolchains/rustup/toolchains")
Expand All @@ -55,10 +59,10 @@ class RustTasksTest {
val push = GradleProject().withMinimalStructure()
val pull = GradleProject().withMinimalStructure()
push.settingsFile.appendText(
"""buildCache.local.directory = File(${push.file("build-cache").absolutePath})"""
"""buildCache.local.directory = File("${push.file("build-cache").absolutePath}")"""
)
pull.settingsFile.appendText(
"""buildCache.local.directory = File(${push.file("build-cache").absolutePath})"""
"""buildCache.local.directory = File("${push.file("build-cache").absolutePath}")"""
)
push.moduleBuildFile("""plugins { id("org.hiero.gradle.feature.rust") }""")
pull.moduleBuildFile("""plugins { id("org.hiero.gradle.feature.rust") }""")
Expand Down

0 comments on commit fe5f220

Please sign in to comment.