-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
62 lines (60 loc) · 2.18 KB
/
tests.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
name: Format & Analyze & Dry-run & Test
on:
push:
branches:
- main
- '6.0.0'
paths-ignore:
- "**.md"
pull_request:
branches:
- main
- '6.0.0'
paths-ignore:
- "**.md"
jobs:
workflows:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [ min, stable, beta ]
steps:
- uses: actions/checkout@v3
- uses: subosito/[email protected]
with:
cache: true
flutter-version: ${{ matrix.sdk == 'min' && '2.8.0' || '' }}
channel: ${{ matrix.sdk == 'min' && '' || matrix.channel }}
- run: |
chmod +x ./scripts/prepare_pinning_certs.sh
./scripts/prepare_pinning_certs.sh
shell: bash
- name: Install proxy for tests
run: sudo apt-get install -y squid
- run: dart pub get
- uses: bluefireteam/melos-action@v2
with:
run-bootstrap: false
- name: Patching files for Flutter ${{ matrix.sdk }}
run: dart ./scripts/files_patch.dart
- name: Check satisfied packages
run: |
dart ./scripts/melos_packages.dart
MELOS_IGNORE_PACKAGES=$(cat .melos_ignore_packages)
- name: Bootstrap
run: |
echo $MELOS_IGNORE_PACKAGES
melos bootstrap $(eval echo $MELOS_IGNORE_PACKAGES)
- name: Format
run: melos exec $(eval cat .melos_ignore_packages) -- "dart format --set-exit-if-changed ."
- name: Analyze Dart packages
run: melos exec $(eval cat .melos_ignore_packages) --no-flutter -- "dart analyze --fatal-infos"
- name: Analyze Flutter packages
run: melos exec $(eval cat .melos_ignore_packages) --flutter -- "flutter analyze --fatal-infos"
- name: Publish dry-run
run: melos exec $(eval cat .melos_ignore_packages) --ignore="*example*" -- "dart pub publish --dry-run"
- name: Test Dart packages
run: melos exec $(eval cat .melos_ignore_packages) --ignore="*example*" --no-flutter -- "dart test --chain-stack-traces --platform=vm,chrome,firefox"
- name: Test Flutter packages
run: melos exec $(eval cat .melos_ignore_packages) --ignore="*example*" --flutter -- "flutter test"