1
0
mirror of https://github.com/h7x4/Jisho-Study-Tool.git synced 2024-12-22 13:57:29 +01:00
Jisho-Study-Tool/.circleci/config.yml
2021-03-06 01:02:39 +01:00

88 lines
2.1 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: Make folder for analysis results
command: mkdir lint_analysis_data
- run:
name: Analyze code
command: flutter analyze --no-fatal-infos > lint_analysis_data/results.txt
- store_artifacts:
path: ~/project/lint_analysis_data
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: Make folder for test results
command: mkdir -p test_results/flutter
- run:
name: Run tests
command: flutter test --machine | ~/.pub-cache/bin/tojunit --output test_results/flutter/results.xml || true
- store_test_results:
path: test_results
workflows:
build_and_test:
jobs:
- build
- lint:
requires:
- build
- test:
requires:
- build