2021-03-03 21:15:03 +01:00
|
|
|
version: 2.1
|
|
|
|
|
2021-03-05 23:19:29 +01:00
|
|
|
jobs:
|
2021-03-05 23:31:36 +01:00
|
|
|
build:
|
|
|
|
description: "Build the application into an Android APK executable"
|
2021-03-05 23:19:29 +01:00
|
|
|
docker:
|
2021-03-05 23:31:36 +01:00
|
|
|
- image: cirrusci/flutter:stable
|
|
|
|
working_directory: ~/project
|
2021-03-03 21:15:03 +01:00
|
|
|
steps:
|
|
|
|
- checkout
|
2021-03-05 23:31:36 +01:00
|
|
|
- run:
|
|
|
|
name: Print
|
|
|
|
command: flutter doctor
|
|
|
|
|
2021-03-03 21:15:03 +01:00
|
|
|
- run:
|
2021-03-05 23:19:29 +01:00
|
|
|
name: Install Dependencies
|
|
|
|
command: flutter pub get
|
2021-03-05 23:31:36 +01:00
|
|
|
|
2021-03-03 21:15:03 +01:00
|
|
|
- run:
|
2021-03-05 23:19:29 +01:00
|
|
|
name: Build
|
2021-03-05 23:31:36 +01:00
|
|
|
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:
|
2021-03-05 23:40:05 +01:00
|
|
|
- image: cirrusci/flutter:stable
|
2021-03-05 23:31:36 +01:00
|
|
|
working_directory: ~/project
|
|
|
|
steps:
|
2021-03-05 23:40:05 +01:00
|
|
|
# - checkout
|
2021-03-05 23:31:36 +01:00
|
|
|
# - restore_cache:
|
|
|
|
# keys:
|
|
|
|
# - dart-dependencies-{{ checksum "pubspec.lock" }}
|
|
|
|
# - dart-dependencies-
|
2021-03-05 23:19:29 +01:00
|
|
|
- run:
|
|
|
|
name: Analyze code
|
|
|
|
command: flutter analyze lib
|
2021-03-03 21:15:03 +01:00
|
|
|
|
|
|
|
test:
|
2021-03-05 23:31:36 +01:00
|
|
|
description: "Run all unittests"
|
2021-03-03 21:15:03 +01:00
|
|
|
docker:
|
2021-03-05 23:40:05 +01:00
|
|
|
- image: cirrusci/flutter:stable
|
2021-03-05 23:31:36 +01:00
|
|
|
working_directory: ~/project
|
2021-03-03 21:15:03 +01:00
|
|
|
steps:
|
2021-03-05 23:40:05 +01:00
|
|
|
# - checkout
|
2021-03-05 23:31:36 +01:00
|
|
|
# - restore_cache:
|
|
|
|
# keys:
|
|
|
|
# - dart-dependencies-{{ checksum "pubspec.lock" }}
|
|
|
|
# - dart-dependencies-
|
2021-03-03 21:15:03 +01:00
|
|
|
|
2021-03-05 23:31:36 +01:00
|
|
|
# - save_cache:
|
|
|
|
# paths:
|
|
|
|
# - .dart_tool
|
|
|
|
# key: dart-dependencies-{{ checksum "pubspec.lock" }}
|
2021-03-03 21:15:03 +01:00
|
|
|
|
2021-03-05 23:19:29 +01:00
|
|
|
- run:
|
|
|
|
name: Run tests
|
|
|
|
command: flutter test | tojunit --output test-results
|
|
|
|
|
|
|
|
- store_test_results:
|
2021-03-05 23:20:50 +01:00
|
|
|
path: test-results
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
build_and_test:
|
|
|
|
jobs:
|
2021-03-05 23:31:36 +01:00
|
|
|
- build
|
2021-03-05 23:40:05 +01:00
|
|
|
- lint:
|
|
|
|
requires: build
|
|
|
|
- test:
|
|
|
|
requires: build
|