mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
- delete the stock Flutter counter widget_test (always failed) and the lightning invoice tests (network-dependent, and the feature is off) - fix rotted assertions: removed-chain wallet types (solana, tron, zano, decred) and mainnet-only BTC/LTC pattern expectations - new test.yml workflow: pub get + analyze + test on push/PR to dev/main - analysis_options: drop excludes for deleted paths, stop excluding the five live coin facades, enable empty_catches and 7 other correctness lints (still 0 analyzer errors) - integration_test_runner: clean hash_wallet data dirs, not cake_wallet
78 lines
2.3 KiB
YAML
78 lines
2.3 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.32.0).
|
|
image: ghcr.io/cake-tech/cake_wallet:debian13-flutter3.32.0-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
|
|
|
|
- name: flutter pub get
|
|
run: flutter pub get
|
|
|
|
- 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
|