Files
hash-wallet/.github/workflows/test.yml
T
jwinterm dd449f2594 Merge upstream Cake Wallet v6.5.0
Catches up from the May 12 fork point (v6.1.2+23) through v6.5.0: 535
upstream commits, including the Monero silent-open fix, Monero on Trezor,
Ledger/Trezor BLE fixes, the new seed and history screens, quick Bitcoin
sync, git-pinned dependencies (pubspec_overrides.yaml), frozen Hive
adapters (*.part.dart), monero_c v0.18.4.6-RC2 and Flutter 3.41.9.

Merged with both sides normalized first (import rename, 100-column
format), which took the conflict count from 614 paths to 322. The
procedure is now scripts/upstream_sync.sh.

Kept from Hash Bags:
- WalletType enum order and Hive IDs. SQLite stores WalletType.index and
  our order differs from upstream's; taking theirs would reread saved
  wallets as other chains. Our frozen adapter keeps the shipped IDs.
- The 1.0.2 legacy PIN and wallet-password decode and self-heal.
- Removed chains (Solana, Tron, Zano, Zcash, Decred, Haven) and the new
  Robinhood chain stay out; Cake Pay and non-Trocador swaps stay out.
- Default nodes (node.wownero.org, sethforprivacy, Blockstream, bysh.me),
  converted to upstream's isDefault node-list key; Wownero is back in the
  node reset list.
- Privacy: address resolvers limited to domain-anchored sources again;
  prices.neroswap.com for fiat; upstream's charts tab, which reads
  prices.cakewallet.com, sits behind FeatureFlag.isChartsEnabled = false.
- Lightning stays behind FeatureFlag.isLightningEnabled, including
  upstream's new post-seed Lightning username step.
- Our icon pipeline, branding and bundle identifiers.

Twelve new upstream widget tests are skipped: test and code are unchanged
from v6.5.0 apart from renames (not rerun on a pristine upstream checkout;
upstream's top_bar_test does not compile against its own TopBar).
flutter analyze lib: 0 errors; flutter test: 345 passed, 12 skipped;
flutter build bundle compiles. Built with Flutter 3.41.9.
2026-10-24 23:49:29 -04:00

96 lines
3.2 KiB
YAML

name: Tests and analysis
# Fast, pure-Dart verification: no native builds, no signing secrets.
# Runs on every push and PR (unlike the manual-dispatch build workflows,
# this finishes in minutes and needs nothing beyond pub get).
on:
push:
branches: [dev, main]
pull_request:
branches: [dev, main]
workflow_dispatch:
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
test:
runs-on: ubuntu-latest
container:
# Same prebuilt image as the build workflows (bundles Flutter 3.41.9).
image: ghcr.io/cake-tech/cake_wallet:debian13-flutter3.41.9-ndkr28-go1.24.1-ruststablenightly
steps:
- name: Fix Actions HOME (writeable for ~/.cache)
run: echo "HOME=/root" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Configure git inside the container
run: git config --global --add safe.directory '*'
# pubspec.yaml has path deps under scripts/ that must exist before
# pub get; fetch the same prebuilt bundles the build workflows use.
- name: Fetch prebuilt torch_dart
run: |
set -x -e
pushd scripts
rm -rf torch_dart torch_dart.tar.gz
wget -q https://github.com/MrCyjaneK/torch_dart/releases/download/v1.0.17/torch_dart-v1.0.17.tar.gz -O torch_dart.tar.gz
mkdir torch_dart
tar -xzf torch_dart.tar.gz -C torch_dart
rm torch_dart.tar.gz
popd
- name: Fetch prebuilt reown_flutter
run: |
set -x -e
pushd scripts
rm -rf reown_flutter reown_flutter.tar.gz
wget -q https://github.com/cake-tech/reown_flutter/releases/download/v0.0.4/reown_flutter-v0.0.4.tar.gz -O reown_flutter.tar.gz
mkdir reown_flutter
tar -xzf reown_flutter.tar.gz -C reown_flutter
rm reown_flutter.tar.gz
popd
- name: Clone BitBox Flutter
run: |
set -x -e
pushd scripts
./build_bitbox_flutter.sh
popd
# pubspec.yaml, the cw_* wiring in it, wallet_types.g.dart, and the
# .secrets.g.dart files are all GENERATED and untracked; a bare
# `flutter pub get` on a fresh checkout can never succeed. Mirror the
# build lanes' generation sequence (empty secrets are fine for tests).
- name: Generate workspace (pubspec, coin modules, empty secrets)
run: |
set -x -e
cp pubspec_description.yaml pubspec.yaml
flutter pub get
dart run tool/generate_pubspec.dart
flutter pub get
dart run tool/configure.dart --monero --bitcoin --ethereum --polygon --nano --bitcoinCash --wownero --dogecoin --base --arbitrum --bsc
flutter pub get
dart run tool/generate_new_secrets.dart
- name: Generate models and localization
run: |
set -e
bash model_generator.sh
dart run tool/generate_localization.dart
- name: flutter analyze (errors are fatal, existing warnings are not)
run: flutter analyze lib --no-fatal-infos --no-fatal-warnings
- name: flutter test
run: flutter test