-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmelos.yaml
105 lines (91 loc) · 4.17 KB
/
melos.yaml
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: chuckle_chest_melos
packages:
- packages/**
- app/
scripts:
update_settings:
description: Copies the latest configuration files into all the packages.
exec: |
mkdir -p .vscode
cp $MELOS_ROOT_PATH/.vscode/settings.json .vscode/
if test -d test; then cp $MELOS_ROOT_PATH/.vscode/test.code-snippets .vscode/; fi
cp $MELOS_ROOT_PATH/analysis_options.yaml analysis_options.yaml
packageFilters:
fileExists: pubspec.yaml
setup:
description: Sets up the development environment. Run this after pulling from a branch.
run: |
echo "WARNING: 'melos format' currently does NOT fail if files are changed. This is because 'dart format' doesn't ignore generated files for an unknown reason."
flutter upgrade
flutter pub global activate melos
melos clean
melos bootstrap
melos update_settings --no-select
melos format
melos analyze
test:
description: Runs all the tests of the specified package(s).
exec: flutter test --coverage --no-pub --test-randomize-ordering-seed random
packageFilters:
dirExists: test
check_coverage:
description: Combines the test coverage from all of the packages and checks for 100% coverage.
run: |
true > \$MELOS_ROOT_PATH/coverage/lcov.info
dart pub global run combine_coverage --repo-path=$MELOS_ROOT_PATH
sed -i '' 's|SF:.*/batchbase2/|SF:/|' $MELOS_ROOT_PATH/coverage/lcov.info
dart pub global run remove_from_coverage --file=$MELOS_ROOT_PATH/coverage/lcov.info --remove='\.g\.dart$'
dart $MELOS_ROOT_PATH/bin/check_coverage.dart $MELOS_ROOT_PATH/coverage/lcov.info
build_staging:
run: |
cd $MELOS_ROOT_PATH/app
flutter build web \
--target=lib/main_staging.dart \
--release \
--pwa-strategy=none \
--base-href "/app/" \
# --pwa-strategy=none: Fixes https://github.com/felangel/bloc/issues/4335
build_production:
run: |
cd $MELOS_ROOT_PATH/app
flutter build web \
--target=lib/main_production.dart \
--release \
--pwa-strategy=none \
--base-href "/app/" \
update_website:
run: rm -rf $MELOS_ROOT_PATH/website/public/app && cp -r $MELOS_ROOT_PATH/app/build/web $MELOS_ROOT_PATH/website/public/app
ci:
description: The procedure of the GitHub CI workflow. Run this before pushing to GitHub.
run: |
echo "WARNING: 'melos format' currently does NOT fail if files are changed. This is because 'dart format' doesn't ignore generated files for an unknown reason."
flutter upgrade --force
flutter pub global activate melos
flutter pub global activate combine_coverage
flutter pub global activate remove_from_coverage
melos clean
melos bootstrap
melos update_settings --no-select
melos format && melos analyze && melos test --no-select && melos check_coverage && melos build_staging -- --dart-define-from-file=secrets.staging.json && melos build_production -- --dart-define-from-file=secrets.production.json
melos update_website
localize:
description: Generates the translations for the specified package(s).
exec: dart $MELOS_ROOT_PATH/bin/sort_l10n.dart l10n.yaml && flutter gen-l10n
packageFilters:
fileExists: l10n.yaml
outdated:
description: Shows outdated packages in the specified package(s).
exec: flutter pub outdated && flutter pub upgrade
packageFilters:
fileExists: pubspec.yaml
build_runner:
description: Runs build runner in the specified package(s).
exec: dart run build_runner build --delete-conflicting-outputs
packageFilters:
fileExists: pubspec.yaml
diff_local_supabase:
description: Creates new migration file with the changes made in the local Supabase studio.
run: supabase db diff --local -f new_public && supabase db diff --local -f new_storage --schema storage && supabase db diff --local -f new_auth --schema auth
diff_linked_supabase:
description: Creates new migration file with the changes made in the linked Supabase project.
run: supabase db diff --linked -f new_public && supabase db diff --linked -f new_storage --schema storage && supabase db diff --linked -f new_auth --schema auth