Skip to content
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
13 changes: 10 additions & 3 deletions .github/workflows/e2e-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ hashFiles('bitkit-e2e-tests/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

Expand All @@ -167,8 +167,15 @@ jobs:
if: matrix.shard.name == 'hardware_wallet'
working-directory: bitkit-e2e-tests
run: |
cd docker
docker compose --profile trezor pull --quiet trezor-user-env
if [[ -x ./scripts/local-backend ]]; then
./scripts/local-backend prepare
export BITKIT_LOCAL_BACKEND_ROOT="$(./scripts/local-backend path)"
./scripts/trezor-emulator pull
printf 'BITKIT_LOCAL_BACKEND_ROOT=%s\n' "$BITKIT_LOCAL_BACKEND_ROOT" >> "$GITHUB_ENV"
else
cd docker
docker compose --profile trezor pull --quiet trezor-user-env
fi

- name: Run E2E Tests 1 (${{ matrix.shard.name }})
continue-on-error: true
Expand Down
27 changes: 14 additions & 13 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
# They sit in Linux's ephemeral range, so an outbound connection made before `docker compose up`
# (npm ci, image pulls) can take one and fail the bind. Reserve them before any network step.
- name: Reserve regtest host ports
run: sudo sysctl -w net.ipv4.ip_local_reserved_ports=39388,43782,60001
run: sudo sysctl -w net.ipv4.ip_local_reserved_ports=23009,23180,23735,39388,43782,60001

- name: Resolve E2E tests ref
id: e2e-ref
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-node-${{ hashFiles('bitkit-e2e-tests/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

Expand All @@ -190,20 +190,21 @@ jobs:
run: npm ci

- name: Run regtest setup
working-directory: bitkit-e2e-tests
run: |
cd docker
mkdir lnd && chmod 777 lnd
docker compose pull --quiet
docker compose up -d

- name: Wait for electrum server and LND
working-directory: bitkit-e2e-tests
timeout-minutes: 10
run: |
while ! nc -z '127.0.0.1' 60001; do sleep 1; done
sudo bash -c "while [ ! -f docker/lnd/data/chain/bitcoin/regtest/admin.macaroon ]; do sleep 1; done"
sudo chmod -R 777 docker/lnd
if [[ -x ./scripts/local-backend ]]; then
./scripts/local-backend up
./scripts/local-backend github-env >> "$GITHUB_ENV"
else
# Older E2E refs still use their bundled Compose stack.
mkdir -p docker/lnd
chmod 777 docker/lnd
(cd docker && docker compose pull --quiet && docker compose up -d)
while ! nc -z '127.0.0.1' 60001; do sleep 1; done
sudo bash -c "while [ ! -f docker/lnd/data/chain/bitcoin/regtest/admin.macaroon ]; do sleep 1; done"
sudo chmod -R 777 docker/lnd
fi

- name: Run E2E Tests 1 (${{ matrix.shard.name }})
continue-on-error: true
Expand Down
Loading