Skip to content

Commit

Permalink
fix: Pass e2e mnemonic to composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
usame-algan committed Jan 9, 2023
1 parent d31a1ff commit 8da29f6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
3 changes: 1 addition & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 &
Expand Down
4 changes: 4 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8da29f6

Please sign in to comment.