Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilize the network for possible URL cases and remove unnecessary environment variables #2463

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/test_integration_playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ jobs:
chmod +w ./lib/_mock
npm run generate-wallets
npm test
if [[ "${{ env.NETWORK }}" == "preprod" ]]; then
echo "FAUCET_API_KEY=${{ secrets.FAUCET_API_KEY_PREPROD }}" >> $GITHUB_ENV
echo "BLOCKFROST_API_KEY=${{ secrets.BLOCKFROST_API_KEY_PREPROD }}" >> $GITHUB_ENV
elif [[ "${{ env.NETWORK }}" == "sanchonet" ]]; then
echo "FAUCET_API_KEY=${{ secrets.FAUCET_API_KEY_SANCHONET }}" >> $GITHUB_ENV
echo "BLOCKFROST_API_KEY=${{ secrets.BLOCKFROST_API_KEY_SANCHONET }}" >> $GITHUB_ENV
else
echo "FAUCET_API_KEY=${{ secrets.FAUCET_API_KEY_PREVIEW }}" >> $GITHUB_ENV
echo "BLOCKFROST_API_KEY=${{ secrets.BLOCKFROST_API_KEY_PREVIEW }}" >> $GITHUB_ENV
fi

- name: Upload report
uses: actions/upload-artifact@v3
Expand All @@ -74,9 +84,6 @@ jobs:
HOST_URL: https://${{inputs.deployment || 'govtool.cardanoapi.io' }}
API_URL: https://${{inputs.deployment || 'govtool.cardanoapi.io' }}/api
DOCS_URL: ${{ vars.DOCS_URL }}
FAUCET_API_URL: ${{ vars.FAUCET_API_URL }}
FAUCET_API_KEY: ${{secrets.FAUCET_API_KEY}}
KUBER_API_URL: ${{vars.KUBER_API_URL}}
KUBER_API_KEY: ${{secrets.KUBER_API_KEY}}
TEST_WORKERS: ${{vars.TEST_WORKERS}}
CI: ${{vars.CI}}
Expand All @@ -85,7 +92,6 @@ jobs:
CARDANOAPI_METADATA_URL: ${{vars.CARDANOAPI_METADATA_URL}}
PROPOSAL_FAUCET_PAYMENT_PRIVATE: ${{secrets.PROPOSAL_FAUCET_PAYMENT_PRIVATE}}
PROPOSAL_FAUCET_STAKE_PRIVATE: ${{secrets.PROPOSAL_FAUCET_STAKE_PRIVATE}}
BLOCKFROST_API_KEY: ${{secrets.BLOCKFROST_API_KEY}}

publish-report:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions tests/govtool-frontend/playwright/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ PDF_URL=https://dev.api.pdf.gov.tools
NETWORK_ID=0

# Faucet
FAUCET_API_URL=https://faucet.sanchonet.world.dev.cardano.org
FAUCET_API_KEY=

#Blockfrost
BLOCKFROST_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXX

# Kuber
KUBER_API_URL=https://sanchonet.kuber.cardanoapi.io
KUBER_API_KEY=

# Transaction timeout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,14 @@ const environments = {
pdfUrl: process.env.PDF_URL || "https://dev.api.pdf.gov.tools",
networkId: parseInt(process.env.NETWORK_ID) || 0,
faucet: {
apiUrl:
process.env.FAUCET_API_URL.replace("sanchonet", NETWORK) ||
"https://faucet.sanchonet.world.dev.cardano.org".replace(
"sanchonet",
NETWORK
),
apiUrl:`https://faucet.${NETWORK}.world.dev.cardano.org`,
apiKey: process.env.FAUCET_API_KEY || "",
address:
process.env.FAUCET_ADDRESS ||
"addr_test1vz0ua2vyk7r4vufmpqh5v44awg8xff26hxlwyrt3uc67maqtql3kl",
},
kuber: {
apiUrl:
process.env.KUBER_API_URL.replace("sanchonet", NETWORK) ||
"https://sanchonet.kuber.cardanoapi.io".replace("sanchonet", NETWORK),
apiUrl: `https://${NETWORK}.kuber.cardanoapi.io`,
apiKey: process.env.KUBER_API_KEY || "",
},
txTimeOut: parseInt(process.env.TX_TIMEOUT) || 240000,
Expand Down
Loading