From ce99ff53c9d13612a54fc7ca161bdabb749d3022 Mon Sep 17 00:00:00 2001 From: Allain Magyar Date: Mon, 25 Mar 2024 12:21:07 -0300 Subject: [PATCH] test: integration slack notification fix + parameter on client publication (#946) Signed-off-by: Allain Magyar --- .github/workflows/integration-tests.yml | 2 +- .github/workflows/release-clients.yml | 7 ++++++- tests/integration-tests/build.gradle.kts | 13 ++++++++++++- .../kotlin/steps/schemas/CredentialSchemasSteps.kt | 2 +- .../VerificationPoliciesSteps.kt | 2 +- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index f448dfdae2..f3871590d8 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -119,7 +119,7 @@ jobs: - name: Upload artifacts if: github.ref_name == 'main' || steps.analyze_test_results.outputs.conclusion == 'failure' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: integration-tests-result path: ${{ env.REPORTS_DIR }} diff --git a/.github/workflows/release-clients.yml b/.github/workflows/release-clients.yml index 27693cec1d..eb0f0cd492 100644 --- a/.github/workflows/release-clients.yml +++ b/.github/workflows/release-clients.yml @@ -2,6 +2,11 @@ name: Publish prism-agent clients on: workflow_dispatch: + inputs: + releaseTag: + description: "Tag to release clients (e.g. prism-agent-v1.31.0)" + required: true + type: string push: tags: - "prism-agent-v*" @@ -11,7 +16,7 @@ jobs: name: 'Build and publish Prism-Agent clients' runs-on: ubuntu-latest env: - VERSION_TAG: ${{github.ref_name}} + VERSION_TAG: ${{inputs.releaseTag || github.ref_name}} ATALA_GITHUB_ACTOR: ${{secrets.ATALA_GITHUB_ACTOR}} ATALA_GITHUB_TOKEN: ${{secrets.ATALA_GITHUB_TOKEN}} NODE_AUTH_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} diff --git a/tests/integration-tests/build.gradle.kts b/tests/integration-tests/build.gradle.kts index 7db4bdc666..6c84edbd7f 100644 --- a/tests/integration-tests/build.gradle.kts +++ b/tests/integration-tests/build.gradle.kts @@ -9,6 +9,13 @@ plugins { group = "io.iohk.atala.prism" version = "1.0-SNAPSHOT" +buildscript { + dependencies { + classpath("net.serenity-bdd:serenity-single-page-report:4.1.4") + classpath("net.serenity-bdd:serenity-json-summary-report:4.1.4") + } +} + repositories { mavenLocal() mavenCentral() @@ -34,7 +41,10 @@ dependencies { testImplementation("com.sksamuel.hoplite:hoplite-hocon:2.7.5") // Kotlin compose testImplementation("org.testcontainers:testcontainers:1.19.1") +} +serenity { + reports = listOf("single-page-html", "json-summary") } tasks.register("cleanTarget") { @@ -43,6 +53,7 @@ tasks.register("cleanTarget") { tasks.test { dependsOn("cleanTarget") + finalizedBy("reports") testLogging.showStandardStreams = true systemProperty("cucumber.filter.tags", System.getProperty("cucumber.filter.tags")) } @@ -74,7 +85,7 @@ afterEvaluate { systemProperty("PRISM_NODE_VERSION", System.getenv("PRISM_NODE_VERSION") ?: "") systemProperty("OPEN_ENTERPRISE_AGENT_VERSION", System.getenv("OPEN_ENTERPRISE_AGENT_VERSION") ?: "") systemProperty("cucumber.filter.tags", System.getProperty("cucumber.filter.tags")) - finalizedBy("aggregate") + finalizedBy("aggregate", "reports") } } diff --git a/tests/integration-tests/src/test/kotlin/steps/schemas/CredentialSchemasSteps.kt b/tests/integration-tests/src/test/kotlin/steps/schemas/CredentialSchemasSteps.kt index da902aa7ef..0c41a2ec32 100644 --- a/tests/integration-tests/src/test/kotlin/steps/schemas/CredentialSchemasSteps.kt +++ b/tests/integration-tests/src/test/kotlin/steps/schemas/CredentialSchemasSteps.kt @@ -1,4 +1,4 @@ -package steps +package steps.schemas import common.TestConstants import interactions.Get diff --git a/tests/integration-tests/src/test/kotlin/steps/verificationpolicies/VerificationPoliciesSteps.kt b/tests/integration-tests/src/test/kotlin/steps/verificationpolicies/VerificationPoliciesSteps.kt index 0b0fe7c663..ab891702a5 100644 --- a/tests/integration-tests/src/test/kotlin/steps/verificationpolicies/VerificationPoliciesSteps.kt +++ b/tests/integration-tests/src/test/kotlin/steps/verificationpolicies/VerificationPoliciesSteps.kt @@ -1,4 +1,4 @@ -package features.verificationpolicies +package steps.verificationpolicies import common.TestConstants import interactions.Get