-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.cirrus.yml
63 lines (54 loc) · 2.02 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
frontend_task:
# MacOS is used as our main CI environment for Flutter
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
container:
image: cirrusci/flutter:latest
# Environment variables
env:
WORKING_DIR: $CIRRUS_WORKING_DIR/shady_ai_flutter
# Scripts to run
analyze_with_flutter_script: |
cd $WORKING_DIR
flutter analyze
flutter test
format_with_dart_script: |
cd $WORKING_DIR
dart format -o none --set-exit-if-changed .
backend_task:
# MacOS is used as our main CI environment for Flutter
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
container:
image: cirrusci/flutter:latest
# Environment variables
env:
WORKING_DIR: $CIRRUS_WORKING_DIR/shady_ai_server
# Scripts to run
format_with_dart_script: |
cd $WORKING_DIR
dart format --output=none --set-exit-if-changed .
analyze_with_dart_script: |
cd $WORKING_DIR
dart pub get
dart analyze --fatal-infos lib/*.dart test
test_coverage_with_dart_script: |
cd $WORKING_DIR
dart pub global activate coverage
dart pub global run coverage:collect_coverage --port=8111 --out=coverage/coverage.json --wait-paused --resume-isolates &
dart --disable-service-auth-codes --enable-vm-service=8111 --pause-isolates-on-exit test/main_test.dart
dart pub global run coverage:format_coverage --lcov --in=coverage/coverage.json --out=coverage/lcov.info --report-on=test
genhtml -o ./coverage ./coverage/lcov.info --branch-coverage
dart test --file-reporter=json:coverage/dart_test_report.json
# Copy artifacts to the Cirrus CI build folder ($CIRRUS_WORKING_DIR)
# Because Cirrus CI doesn't support artifacts from other folders
copy_artifacts_script: |
cp -r $WORKING_DIR/coverage $CIRRUS_WORKING_DIR
# Upload artifacts from Cirrus CI build folder ($CIRRUS_WORKING_DIR)
always:
coverage_artifacts:
path: "coverage/**/*"
type: "text/html"
dart_test_report_artifacts:
path: "coverage/dart_test_report.json"
format: flutter