-
Notifications
You must be signed in to change notification settings - Fork 45
146 lines (119 loc) · 3.3 KB
/
elementary_analysis.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: elementary analysis
on:
pull_request:
branches:
- main
paths:
- "packages/elementary/**"
- ".github/workflows/elementary_analysis.yaml"
push:
branches:
- main
paths:
- "packages/elementary/**"
- ".github/workflows/elementary_analysis.yaml"
jobs:
analysis:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/elementary
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Check Files
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "LICENSE, README.md, example, CHANGELOG.md"
- name: File exists
if: steps.check_files.outputs.files_exists == 'true'
run: echo Content is ok!
- name: Install dependencies
run: flutter pub get
- name: Run dependency validator
run: |
dart pub global activate dependency_validator
dart pub global run dependency_validator:dependency_validator
- name: Run analyzer
run: flutter analyze --fatal-warnings --fatal-infos .
- name: Run formatter
run: dart format --set-exit-if-changed .
- name: Run package analyzer
uses: axel-op/dart-package-analyzer@v3
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
relativePath: packages/elementary/
testing:
needs: analysis
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/elementary
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install dependencies
run: flutter pub get
- name: Run tests
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
if: success()
run: |
flutter test --coverage
bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info -F elementary
build_android_example:
needs: analysis
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: packages/elementary
steps:
# Setup Java environment in order to build the Android app.
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: "12.x"
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install dependencies
run: flutter pub get
- name: Build Android
run: |
cd example
flutter pub get
flutter build apk
build_ios_example:
needs: analysis
runs-on: macos-latest
defaults:
run:
shell: bash
working-directory: packages/elementary
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install dependencies
run: flutter pub get
- name: Build iOS
run: |
cd example
flutter pub get
flutter build ios --release --no-codesign