version: 2.1 jobs: build: description: "Build the application into an Android APK executable" docker: - image: cirrusci/flutter:stable working_directory: ~/project steps: - checkout - run: name: Print command: flutter doctor - run: name: Install Dependencies command: flutter pub get - run: name: Build command: flutter -v build apk # - save_cache: # paths: # - .dart_tool # key: dart-dependencies-{{ checksum "pubspec.lock" }} lint: description: "Run static analysis for the code" docker: - image: cirrusci/flutter:stable working_directory: ~/project steps: # - checkout # - restore_cache: # keys: # - dart-dependencies-{{ checksum "pubspec.lock" }} # - dart-dependencies- - run: name: Analyze code command: flutter analyze lib test: description: "Run all unittests" docker: - image: cirrusci/flutter:stable working_directory: ~/project steps: # - checkout # - restore_cache: # keys: # - dart-dependencies-{{ checksum "pubspec.lock" }} # - dart-dependencies- # - save_cache: # paths: # - .dart_tool # key: dart-dependencies-{{ checksum "pubspec.lock" }} - run: name: Run tests command: flutter test | tojunit --output test-results - store_test_results: path: test-results workflows: build_and_test: jobs: - build - lint: requires: build - test: requires: build