-
Notifications
You must be signed in to change notification settings - Fork 10
198 lines (157 loc) · 8.73 KB
/
pull-request.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
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
name: Pull Request Worfklow
on: [ pull_request ]
concurrency:
group: ${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
check:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3.4.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: check for changes in folders
run: |
echo "changes_starport_template=$(git diff --quiet HEAD origin/$GITHUB_BASE_REF -- starport_template && echo "false" || echo "true")" >> $GITHUB_ENV
echo "changes_transaction_signing_gateway=$(git diff --quiet HEAD origin/$GITHUB_BASE_REF -- packages/transaction_signing_gateway && echo "false" || echo "true")" >> $GITHUB_ENV
echo "changes_cosmos_lint=$(git diff --quiet HEAD origin/$GITHUB_BASE_REF -- packages/cosmos_lint && echo "false" || echo "true")" >> $GITHUB_ENV
echo "changes_cosmos_ui_components=$(git diff --quiet HEAD origin/$GITHUB_BASE_REF -- packages/cosmos_ui_components && echo "false" || echo "true")" >> $GITHUB_ENV
echo "changes_cosmos_utils=$(git diff --quiet HEAD origin/$GITHUB_BASE_REF -- packages/cosmos_utils && echo "false" || echo "true")" >> $GITHUB_ENV
echo "changes_cosmos_auth=$(git diff --quiet HEAD origin/$GITHUB_BASE_REF -- packages/cosmos_auth && echo "false" || echo "true")" >> $GITHUB_ENV
echo "cosmos_node_client=$(git diff --quiet HEAD origin/$GITHUB_BASE_REF -- packages/cosmos_node_client && echo "false" || echo "true")" >> $GITHUB_ENV
- uses: kuhnroyal/flutter-fvm-config-action@v1
with:
path: 'starport_template/.fvm/fvm_config.json'
- uses: subosito/flutter-action@v1
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
###########################################################################################
## COSMOS_LINT
###########################################################################################
- name: cosmos_lint - pub get
working-directory: packages/cosmos_lint
if: env.changes_cosmos_lint == 'true'
run: flutter pub get
- name: cosmos_lint - dart analysis
working-directory: packages/cosmos_lint
if: env.changes_cosmos_lint == 'true'
run: flutter analyze
###########################################################################################
## TRANSACTION_SIGNING_GATEWAY
###########################################################################################
- name: transaction_signing_gateway - pub get
working-directory: packages/transaction_signing_gateway
if: env.changes_transaction_signing_gateway == 'true'
run: flutter pub get
- name: transaction_signing_gateway - check codestyle
working-directory: packages/transaction_signing_gateway
if: env.changes_transaction_signing_gateway == 'true'
run: find lib test -name "*.dart" -not -name "*.g.dart" -not -name "*.freezed.dart" -not -name "*.gen.dart" -exec dart format -l 120 --set-exit-if-changed {} +;
- name: transaction_signing_gateway - dart analysis
working-directory: packages/transaction_signing_gateway
if: env.changes_transaction_signing_gateway == 'true'
run: flutter analyze
- name: transaction_signing_gateway - tests
working-directory: packages/transaction_signing_gateway
if: env.changes_transaction_signing_gateway == 'true'
run: flutter test
###########################################################################################
## COSMOS_NODE_CLIENT
###########################################################################################
- name: cosmos_node_client - pub get
working-directory: packages/cosmos_node_client
if: env.changes_transaction_signing_gateway == 'true'
run: flutter pub get
- name: cosmos_node_client - check codestyle
working-directory: packages/cosmos_node_client
if: env.cosmos_node_client == 'true'
run: find lib test -name "*.dart" -not -name "*.g.dart" -not -name "*.freezed.dart" -not -name "*.gen.dart" -exec dart format -l 120 --set-exit-if-changed {} +;
- name: cosmos_node_client - dart analysis
working-directory: packages/cosmos_node_client
if: env.cosmos_node_client == 'true'
run: flutter analyze
- name: cosmos_node_client - tests
working-directory: packages/cosmos_node_client
if: env.cosmos_node_client == 'true'
run: flutter test
###########################################################################################
## COSMOS_UI_COMPONENTS
###########################################################################################
- name: cosmos_ui_components - pub get
working-directory: packages/cosmos_ui_components
if: env.changes_cosmos_ui_components == 'true'
run: flutter pub get
- name: cosmos_ui_components - check codestyle
working-directory: packages/cosmos_ui_components
if: env.changes_cosmos_ui_components == 'true'
run: find lib test -name "*.dart" -not -name "*.g.dart" -not -name "*.freezed.dart" -not -name "*.gen.dart" -exec dart format -l 120 --set-exit-if-changed {} +;
- name: cosmos_ui_components - dart analysis
working-directory: packages/cosmos_ui_components
if: env.changes_cosmos_ui_components == 'true'
run: flutter analyze
- name: cosmos_ui_components - tests
working-directory: packages/cosmos_ui_components
if: env.changes_cosmos_ui_components == 'true'
run: flutter test --dart-define=IS_CI=true
###########################################################################################
## COSMOS_UTILS
###########################################################################################
- name: cosmos_utils - pub get
working-directory: packages/cosmos_utils
if: env.changes_cosmos_utils == 'true'
run: flutter pub get
- name: cosmos_utils - check codestyle
working-directory: packages/cosmos_utils
if: env.changes_cosmos_utils == 'true'
run: find lib test -name "*.dart" -not -name "*.g.dart" -not -name "*.freezed.dart" -not -name "*.gen.dart" -exec dart format -l 120 {} +
- name: cosmos_utils - dart analysis
working-directory: packages/cosmos_utils
if: env.changes_cosmos_utils == 'true'
run: flutter analyze
- name: cosmos_utils - tests
working-directory: packages/cosmos_utils
if: env.changes_cosmos_utils == 'true'
run: flutter test
###########################################################################################
## COSMOS_AUTH
###########################################################################################
- name: cosmos_auth - pub get
working-directory: packages/cosmos_auth
if: env.changes_cosmos_auth == 'true'
run: flutter pub get
- name: cosmos_auth - check codestyle
working-directory: packages/cosmos_auth
if: env.changes_cosmos_auth == 'true'
run: find lib test -name "*.dart" -not -name "*.g.dart" -not -name "*.freezed.dart" -not -name "*.gen.dart" -exec dart format -l 120 {} +
- name: cosmos_auth - dart analysis
working-directory: packages/cosmos_auth
if: env.changes_cosmos_auth == 'true'
run: flutter analyze
- name: cosmos_auth - tests
working-directory: packages/cosmos_auth
if: env.changes_cosmos_auth == 'true'
run: flutter test
###########################################################################################
## STARPORT_TEMPLATE
###########################################################################################
- name: starport_template - pub get
working-directory: starport_template
if: env.changes_starport_template == 'true'
run: flutter pub get
- name: starport_template - check codestyle
working-directory: starport_template
if: env.changes_starport_template == 'true'
run: find lib test -name "*.dart" -not -name "*.g.dart" -not -name "*.freezed.dart" -not -name "*.gen.dart" -exec dart format -l 120 --set-exit-if-changed {} +;
- name: starport_template - dart analysis
working-directory: starport_template
if: env.changes_starport_template == 'true'
run: flutter analyze
- name: starport_template - tests
working-directory: starport_template
if: env.changes_starport_template == 'true'
run: flutter test