77 lines
1.7 KiB
YAML
77 lines
1.7 KiB
YAML
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 --no-fatal-infos
|
|
|
|
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-
|
|
|
|
- run:
|
|
name: Install test report converter tool
|
|
command: pub global activate junitreport
|
|
|
|
- run:
|
|
name: Run tests
|
|
command: flutter test --machine | ~/.pub-cache/bin/tojunit --output test-results.xml
|
|
|
|
- store_test_results:
|
|
path: test-results.xml
|
|
|
|
workflows:
|
|
build_and_test:
|
|
jobs:
|
|
- build
|
|
- lint:
|
|
requires:
|
|
- build
|
|
- test:
|
|
requires:
|
|
- build |