Jisho-Study-Tool/.circleci/config.yml

74 lines
1.7 KiB
YAML
Raw Normal View History

2021-03-03 21:15:03 +01:00
version: 2.1
2021-03-05 23:19:29 +01:00
jobs:
# build:
# docker:
# - image: cirrusci/flutter:stable
# steps:
# - checkout
# - run: flutter doctor
# - run: flutter test
# - run: flutter -v build apk
2021-03-03 21:15:03 +01:00
2021-03-05 23:19:29 +01:00
lint:
description: "Run static analysis for Flutter"
docker:
- image: cirrusci/flutter:v1.10.7
working_directory: ~/repo
2021-03-03 21:15:03 +01:00
steps:
- checkout
- restore_cache:
keys:
2021-03-05 23:19:29 +01:00
- dart-dependencies-{{ checksum "pubspec.lock" }}
- dart-dependencies-
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-03 21:15:03 +01:00
- run:
2021-03-05 23:19:29 +01:00
name: Build
command: flutter packages pub run build_runner build
2021-03-03 21:15:03 +01:00
- save_cache:
paths:
- .dart_tool
2021-03-05 23:19:29 +01:00
key: dart-dependencies-{{ checksum "pubspec.lock" }}
- run:
name: Analyze code
command: flutter analyze lib
2021-03-03 21:15:03 +01:00
test:
2021-03-05 23:19:29 +01:00
description: "Run tests for Flutter"
2021-03-03 21:15:03 +01:00
docker:
2021-03-05 23:19:29 +01:00
- image: cirrusci/flutter:v1.10.7
working_directory: ~/repo
2021-03-03 21:15:03 +01:00
steps:
2021-03-05 23:19:29 +01:00
- checkout
- restore_cache:
keys:
- dart-dependencies-{{ checksum "pubspec.lock" }}
- dart-dependencies-
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-03 21:15:03 +01:00
- run:
2021-03-05 23:19:29 +01:00
name: Build
command: flutter packages pub run build_runner build
2021-03-03 21:15:03 +01:00
2021-03-05 23:19:29 +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:
- lint
- test