Skip to content

Commit fd76a9b

Browse files
committed
chore: update integration workflow to include new network options and adjust API key handling
1 parent 5400abe commit fd76a9b

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

.github/workflows/test_integration_playwright.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,22 @@ on:
99
deployment:
1010
required: true
1111
type: choice
12-
default: "govtool.cardanoapi.io"
12+
default: "preview.gov.tools"
1313
options:
1414
- "sanchogov.tools"
1515
- "staging.govtool.byron.network"
1616
- "govtool.cardanoapi.io"
1717
- "preview.gov.tools"
1818
- "gov.tools"
19+
network:
20+
required: true
21+
type: choice
22+
default: "preview"
23+
options:
24+
- "sanchonet"
25+
- "preview"
26+
- "mainnet"
27+
- "preprod"
1928

2029
workflow_run:
2130
workflows: ["Build and deploy GovTool to TEST server"]
@@ -56,23 +65,19 @@ jobs:
5665
chmod +w ./lib/_mock
5766
npm run generate-wallets
5867
59-
# Set network variables based on deployment input and environment
60-
if [[ "${{inputs.deployment}}" == "gov.tools" ]]; then
61-
export NETWORK='mainnet'
62-
else
63-
export NETWORK="${{ vars.NETWORK }}"
64-
fi
65-
6668
# Set API keys based on the network
67-
if [[ "${{ vars.NETWORK }}" == "preprod" ]]; then
69+
if [[ "${{ env.NETWORK }}" == "preprod" ]]; then
6870
export FAUCET_API_KEY="${{ secrets.FAUCET_API_KEY_PREPROD }}"
6971
export BLOCKFROST_API_KEY="${{ secrets.BLOCKFROST_API_KEY_PREPROD }}"
70-
elif [[ "${{ vars.NETWORK }}" == "sanchonet" ]]; then
72+
elif [[ "${{ env.NETWORK }}" == "sanchonet" ]]; then
7173
export FAUCET_API_KEY="${{ secrets.FAUCET_API_KEY_SANCHONET }}"
7274
export BLOCKFROST_API_KEY="${{ secrets.BLOCKFROST_API_KEY_SANCHONET }}"
73-
else
75+
elif [[ "${{ env.NETWORK }}" == "preview" ]]; then
7476
export FAUCET_API_KEY="${{ secrets.FAUCET_API_KEY_PREVIEW }}"
7577
export BLOCKFROST_API_KEY="${{ secrets.BLOCKFROST_API_KEY_PREVIEW }}"
78+
else
79+
export FAUCET_API_KEY="${{ secrets.FAUCET_API_KEY_PREVIEW }}"
80+
export BLOCKFROST_API_KEY="${{ secrets.BLOCKFROST_API_KEY_MAINNET }}"
7681
fi
7782
7883
npm test
@@ -96,6 +101,7 @@ jobs:
96101
API_URL: https://${{inputs.deployment || 'govtool.cardanoapi.io' }}/api
97102
DOCS_URL: ${{ vars.DOCS_URL }}
98103
KUBER_API_KEY: ${{secrets.KUBER_API_KEY}}
104+
NETWORK: ${{ inputs.deployment || vars.NETWORK }}
99105
TEST_WORKERS: ${{vars.TEST_WORKERS}}
100106
CI: ${{vars.CI}}
101107
FAUCET_ADDRESS: ${{vars.FAUCET_ADDRESS}}

0 commit comments

Comments
 (0)