From 8da29f6f89eca61b643428e047ae7e886a55e639 Mon Sep 17 00:00:00 2001 From: Usame Algan Date: Mon, 9 Jan 2023 14:56:37 +0100 Subject: [PATCH] fix: Pass e2e mnemonic to composite action --- .github/workflows/build/action.yml | 5 +++++ .github/workflows/e2e.yml | 3 +-- cypress.config.js | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build/action.yml b/.github/workflows/build/action.yml index c6b59983a1..99b2a3472f 100644 --- a/.github/workflows/build/action.yml +++ b/.github/workflows/build/action.yml @@ -10,6 +10,10 @@ inputs: description: 'Production build flag' required: false + e2e_mnemonic: + description: 'Mnemonic for the E2E tests' + required: false + runs: using: 'composite' steps: @@ -30,3 +34,4 @@ runs: NEXT_PUBLIC_TENDERLY_PROJECT_NAME: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_TENDERLY_PROJECT_NAME }} NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_TENDERLY_SIMULATE_ENDPOINT_URL }} NEXT_PUBLIC_WC_BRIDGE: ${{ fromJSON(inputs.secrets).NEXT_PUBLIC_WC_BRIDGE }} + NEXT_PUBLIC_CYPRESS_MNEMONIC: ${{ inputs.e2e_mnemonic }} diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c51b847aff..9ac7334dfd 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -22,10 +22,9 @@ jobs: ./node_modules/.bin/cypress install - uses: ./.github/workflows/build - env: - NEXT_PUBLIC_CYPRESS_MNEMONIC: ${ { secrets.NEXT_PUBLIC_CYPRESS_MNEMONIC } } with: secrets: ${{ toJSON(secrets) }} + e2e_mnemonic: ${{ secrets.NEXT_PUBLIC_CYPRESS_MNEMONIC }} - name: Serve run: yarn serve & diff --git a/cypress.config.js b/cypress.config.js index 99f648738f..4cd6bab0e7 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -4,6 +4,10 @@ export default defineConfig({ projectId: 'exhdra', trashAssetsBeforeRuns: true, + env: { + NEXT_PUBLIC_CYPRESS_MNEMONIC: process.env.NEXT_PUBLIC_CYPRESS_MNEMONIC, + }, + retries: { runMode: 2, openMode: 0,