-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.59 KB
/
Copy pathci.yml
File metadata and controls
59 lines (48 loc) · 1.59 KB
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
name: ci
on:
pull_request:
push:
branches:
- main
jobs:
verify:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Dart
uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Check formatting
run: dart format --set-exit-if-changed .
- name: Analyze packages
run: dart run melos exec -- dart analyze .
- name: Test packages
run: dart run melos exec -- dart test
- name: Audit clean sample
run: |
dart run flutter_guardian audit \
--project-root apps/guardian_clean_app \
--json apps/guardian_clean_app/guardian-report.json \
--html apps/guardian_clean_app/guardian-report.html
- name: Audit unsafe sample should fail
run: |
set +e
dart run flutter_guardian audit \
--project-root apps/guardian_sample_app \
--json apps/guardian_sample_app/guardian-report.json \
--html apps/guardian_sample_app/guardian-report.html
status=$?
set -e
if [ "$status" -eq 0 ]; then
echo "guardian_sample_app was expected to fail but passed"
exit 1
fi
echo "guardian_sample_app failed as expected"
- name: Generate config sample
run: |
dart run flutter_guardian generate \
--from apps/guardian_clean_app/config/app_env.yaml \
--out apps/guardian_clean_app/lib/generated/app_env.dart \
--class AppEnv