test: add test for updateDefaultAccount #6
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: Run tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - .github/workflows/tests.yml | |
| - lib/** | |
| - test/** | |
| - integration_test/** | |
| - pubspec.yaml | |
| - pubspec.lock | |
| pull_request: | |
| paths: | |
| - .github/workflows/tests.yml | |
| - lib/** | |
| - test/** | |
| - integration_test/** | |
| - pubspec.yaml | |
| - pubspec.lock | |
| jobs: | |
| tests: | |
| name: ${{ matrix.os }} Latest | |
| strategy: | |
| # This prevents one failure from stopping the entire run. | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu, windows, macos] | |
| runs-on: ${{ matrix.os }}-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Flutter (stable) | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| # To skip installing CocoaPods, ruby and avoid any build failures or compatibility issues. | |
| - name: Enable Flutter Swift Package Manager on macOS | |
| run: flutter config --enable-swift-package-manager | |
| if: runner.os == 'macOS' | |
| - name: Install package dependencies | |
| run: flutter pub get | |
| - name: Run Flutter unit tests | |
| run: flutter test | |
| timeout-minutes: 5 | |
| - name: Install Linux dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa | |
| sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev | |
| # For more details: https://docs.flutter.dev/testing/integration-tests#test-on-a-desktop-platform | |
| - name: Run Flutter integration tests on Linux | |
| if: runner.os == 'Linux' | |
| uses: smithki/[email protected] | |
| with: | |
| run: flutter test integration_test -d linux -r github | |
| - name: Run Flutter integration tests on Non-Linux platforms | |
| if: runner.os != 'Linux' | |
| run: flutter test integration_test -d ${{ runner.os }} |