chore: AAB builds and iOS version #1226
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Analyze and Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| jobs: | |
| analyze_and_test: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v6 | |
| # Caches below are restored before any toolchain step that uses | |
| # them, so the SDK download / pub resolve / crate fetch on a cold | |
| # runner only pays out on a cache miss. The pub cache also holds the | |
| # bull_sdk git clone; the Cargo cache holds its transitive crates.io | |
| # deps. All three keys derive from lockfiles, so they self-invalidate | |
| # when deps change. pubspec.lock pins the bull_sdk commit, so it is | |
| # the right key for the Cargo cache (there is no repo-root Cargo.lock). | |
| - name: Cache Flutter SDK (FVM) | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/fvm/versions | |
| key: fvm-${{ runner.os }}-${{ hashFiles('.fvmrc') }} | |
| - name: Cache pub (hosted + git deps) | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.pub-cache | |
| key: pub-${{ runner.os }}-${{ hashFiles('pubspec.lock') }} | |
| restore-keys: pub-${{ runner.os }}- | |
| - name: Cache Cargo (FRB native crates) | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: cargo-${{ runner.os }}-${{ hashFiles('pubspec.lock') }} | |
| restore-keys: cargo-${{ runner.os }}- | |
| - name: Install FVM | |
| run: | | |
| curl -fsSL https://fvm.app/install.sh | bash -s -- 4.0.5 | |
| echo "$HOME/fvm/bin" >> $GITHUB_PATH | |
| - run: make fvm-check | |
| - run: make deps | |
| - run: make build-runner | |
| - run: make translations | |
| - name: Create .env file | |
| run: | | |
| echo "TEST_ALICE_MNEMONIC=${{ secrets.ENV_TEST_ALICE_MNEMONIC }}" >> .env | |
| echo "TEST_BOB_MNEMONIC=${{ secrets.ENV_TEST_BOB_MNEMONIC }}" >> .env | |
| - name: Linter shouldn't raise errors, warnings or infos | |
| run: fvm flutter analyze --fatal-warnings --fatal-infos | |
| - name: dart fix should have nothing to suggest | |
| run: | | |
| output=$(fvm dart fix --dry-run) | |
| echo "$output" | |
| echo "$output" | grep -q "Nothing to fix!" | |
| - name: Unit tests must pass | |
| run: make unit-test | |
| - name: Install Linux desktop for integration tests | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| clang lld cmake ninja-build pkg-config \ | |
| libgtk-3-dev liblzma-dev libstdc++-12-dev \ | |
| libsecret-1-dev libsecret-tools libcurl4-openssl-dev \ | |
| dbus gnome-keyring \ | |
| xdg-desktop-portal xdg-desktop-portal-gtk \ | |
| libsqlite3-dev xvfb xauth | |
| # The tests build and launch the real Linux GTK app, which needs a | |
| # display to init even though the tests themselves render nothing — | |
| # on a headless runner the app aborts at startup ("log reader | |
| # stopped unexpectedly / Unable to start the app on the device"). | |
| # xvfb-run gives it a virtual X server. dbus-run-session + an | |
| # unlocked gnome-keyring provide the Secret Service flutter_secure_storage needs. | |
| - name: Integration tests (Linux desktop) | |
| run: | | |
| xvfb-run -a dbus-run-session -- bash -c ' | |
| echo "" | gnome-keyring-daemon --unlock --daemonize --components=secrets | |
| make integration-test | |
| ' |