Skip to content

Fix initial token claim for new wallets #424

Fix initial token claim for new wallets

Fix initial token claim for new wallets #424

Workflow file for this run

name: E2E Test
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: "${{ github.ref != 'refs/heads/main' }}"
on:
workflow_dispatch:
merge_group:
pull_request:
branches:
- main
push:
branches:
- main
env:
CACHE_TIMEOUT_MINUTES: 5
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: sccache
CC: sccache clang
CXX: sccache clang++
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- name: Setup sccache
uses: mozilla-actions/[email protected]
timeout-minutes: "${{ fromJSON(env.CACHE_TIMEOUT_MINUTES) }}"
continue-on-error: true
- name: Checkout code
uses: actions/checkout@v5
- name: Install wasm-pack
run:
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- uses: sigoden/install-binary@v1
with:
repo: WebAssembly/binaryen
name: wasm-opt
- name: Install worker-build
run: cargo install --locked worker-build
- name: Set up k6 (with browser)
uses: grafana/setup-k6-action@v1
with:
browser: true
- name: Set up secrets
shell: bash
run: |
echo "SECRET_WALLET=${{ secrets.TEST_CALIBNET_PRIVATE_KEY_HEX }}" > .dev.vars
echo "SECRET_MAINNET_WALLET=${{ secrets.TEST_MAINNET_PRIVATE_KEY_HEX }}" >> .dev.vars
echo "SECRET_CALIBNET_USDFC_WALLET=${{ secrets.TEST_CALIBNET_USDFC_PRIVATE_KEY_HEX }}" >> .dev.vars
- name: Run website
run: |
# These might or might not be the same as used for deployment. They are used strictly for testing purposes.
# Note: those can't be put directly as environment variables in GH Actions (without a default value) due to
# the way GH Actions handles secrets and variables; forks would not be able to access them and in turn
# would not be able to run the E2E tests.
export FAUCET_TOPUP_REQ_URL="https://github.com/ChainSafe/forest-explorer/discussions/134"
export FAUCET_TX_URL_CALIBNET="https://beryx.io/fil/calibration/"
export FAUCET_TX_URL_MAINNET="https://beryx.io/fil/mainnet/"
corepack enable
yarn --immutable
yarn build
yarn start &
echo "waiting"
timeout 120 sh -c 'until nc -z $0 $1; do sleep 1; done' 127.0.0.1 8787
- name: Run k6 E2E script
uses: grafana/run-k6-action@v1
with:
path: 'e2e/script.js'