-
Notifications
You must be signed in to change notification settings - Fork 206
117 lines (109 loc) · 3.11 KB
/
validate.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
106
107
108
109
110
111
112
113
114
115
116
117
name: all_packages
on:
pull_request:
push:
branches:
- main
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Analyze
uses: invertase/github-action-dart-analyzer@v1
with:
fatal-infos: true
fatal-warnings: true
# This job ensures `melos` compiles and runs fine on the
# minimum Dart SDK version that it supports.
dart_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: 2.18.0 # Update when min sdk supported version of `melos` package changes.
- name: Run Melos
run: ./.github/workflows/scripts/install-tools.sh
# This job ensures `melos` can be installed alongside Flutter dependencies on
# the stable channel.
melos_flutter_deps_check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Get dependencies
working-directory: packages/melos_flutter_deps_check
run: flutter pub get
format:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Check formatting
run: melos format:check
test_linux:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Run Tests
run: melos test --no-select
test_macos:
runs-on: macos-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Tools
run: ./.github/workflows/scripts/install-tools.sh
- name: Run Tests
run: melos test --no-select
test_windows:
runs-on: windows-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Tools
run: .\.github\workflows\scripts\install-tools.bat
- name: Run Tests
# TODO: Figure out why invoking Melos via PowerShell doesn't work properly.
# When using PowerShell, the exit code is not propagated correctly.
# Even running `CMD /C melos ...` from PowerShell does not work.
shell: cmd
run: melos test --no-select