Skip to content

Commit 385b85d

Browse files
committed
Update CI
1 parent de9edc1 commit 385b85d

File tree

2 files changed

+167
-11
lines changed

2 files changed

+167
-11
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: "Validate"
2+
description: "Runs lint, format, and test on an app"
3+
inputs:
4+
working-directory:
5+
description: "Directory to run validation in"
6+
required: true
7+
run-integration-tests:
8+
description: "Run integration tests"
9+
required: false
10+
default: "true"
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Set up flutter
16+
uses: kuhnroyal/flutter-fvm-config-action/setup@v3
17+
18+
- name: Get dependencies
19+
shell: bash
20+
run: dart pub get
21+
working-directory: ${{ inputs.working-directory }}
22+
23+
- name: Check dart formatting
24+
shell: bash
25+
run: dart format -o none --set-exit-if-changed .
26+
working-directory: ${{ inputs.working-directory }}
27+
28+
- name: Check dart analysis
29+
shell: bash
30+
run: dart analyze --fatal-infos --fatal-warnings .
31+
working-directory: ${{ inputs.working-directory }}
32+
33+
- name: Run unit tests and prepare coverage
34+
shell: bash
35+
run: |
36+
dart test --coverage
37+
# Extract directory name for artifact naming
38+
echo "DIR_NAME=$(basename "${{ inputs.working-directory }}")" >> $GITHUB_ENV
39+
working-directory: ${{ inputs.working-directory }}
40+
41+
- name: Upload coverage artifact
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: coverage-lcov-${{ env.DIR_NAME }}
45+
path: ${{ inputs.working-directory }}/coverage/lcov.info

.github/workflows/static_analysis_and_tests.yml

Lines changed: 122 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
- refresh
99

1010
jobs:
11-
todos_repository_local_storage:
12-
name: Todos Repository Local Storage
11+
change_notifier_provider:
12+
name: change_notifier_provider
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout repository
@@ -18,10 +18,9 @@ jobs:
1818
- name: Static Analysis & Tests
1919
uses: ./.github/actions/flutter_analysis_and_tests
2020
with:
21-
working-directory: ./todos_repository_local_storage
22-
run-integration-tests: false
23-
vanilla:
24-
name: Vanilla
21+
working-directory: ./change_notifier_provider
22+
inherited_widget:
23+
name: inherited_widget
2524
runs-on: ubuntu-latest
2625
steps:
2726
- name: Checkout repository
@@ -30,9 +29,9 @@ jobs:
3029
- name: Static Analysis & Tests
3130
uses: ./.github/actions/flutter_analysis_and_tests
3231
with:
33-
working-directory: ./vanilla
34-
inherited_widget:
35-
name: Inherited Widget
32+
working-directory: ./inherited_widget
33+
mobx:
34+
name: mobx
3635
runs-on: ubuntu-latest
3736
steps:
3837
- name: Checkout repository
@@ -41,11 +40,123 @@ jobs:
4140
- name: Static Analysis & Tests
4241
uses: ./.github/actions/flutter_analysis_and_tests
4342
with:
44-
working-directory: ./inherited_widget
43+
working-directory: ./mobx
44+
mvi_base:
45+
name: mvi_base
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v4
50+
51+
- name: Static Analysis & Tests
52+
uses: ./.github/actions/dart_analysis_and_tests
53+
with:
54+
working-directory: ./mvi_base
55+
mvi_flutter:
56+
name: mvi_flutter
57+
runs-on: ubuntu-latest
58+
steps:
59+
- name: Checkout repository
60+
uses: actions/checkout@v4
61+
62+
- name: Static Analysis & Tests
63+
uses: ./.github/actions/flutter_analysis_and_tests
64+
with:
65+
working-directory: ./mvi_flutter
66+
redux:
67+
name: redux
68+
runs-on: ubuntu-latest
69+
steps:
70+
- name: Checkout repository
71+
uses: actions/checkout@v4
72+
73+
- name: Static Analysis & Tests
74+
uses: ./.github/actions/flutter_analysis_and_tests
75+
with:
76+
working-directory: ./redux
77+
scoped_model:
78+
name: scoped_model
79+
runs-on: ubuntu-latest
80+
steps:
81+
- name: Checkout repository
82+
uses: actions/checkout@v4
83+
84+
- name: Static Analysis & Tests
85+
uses: ./.github/actions/flutter_analysis_and_tests
86+
with:
87+
working-directory: ./scoped_model
88+
signals:
89+
name: signals
90+
runs-on: ubuntu-latest
91+
steps:
92+
- name: Checkout repository
93+
uses: actions/checkout@v4
94+
95+
- name: Static Analysis & Tests
96+
uses: ./.github/actions/flutter_analysis_and_tests
97+
with:
98+
working-directory: ./signals
99+
simple_bloc_flutter:
100+
name: simple_bloc_flutter
101+
runs-on: ubuntu-latest
102+
steps:
103+
- name: Checkout repository
104+
uses: actions/checkout@v4
105+
106+
- name: Static Analysis & Tests
107+
uses: ./.github/actions/flutter_analysis_and_tests
108+
with:
109+
working-directory: ./simple_bloc_flutter
110+
simple_blocs:
111+
name: simple_blocs
112+
runs-on: ubuntu-latest
113+
steps:
114+
- name: Checkout repository
115+
uses: actions/checkout@v4
116+
117+
- name: Static Analysis & Tests
118+
uses: ./.github/actions/dart_analysis_and_tests
119+
with:
120+
working-directory: ./simple_blocs
121+
todos_repository_local_storage:
122+
name: todos_repository_local_storage
123+
runs-on: ubuntu-latest
124+
steps:
125+
- name: Checkout repository
126+
uses: actions/checkout@v4
127+
128+
- name: Static Analysis & Tests
129+
uses: ./.github/actions/flutter_analysis_and_tests
130+
with:
131+
working-directory: ./todos_repository_local_storage
132+
run-integration-tests: false
133+
vanilla:
134+
name: vanilla
135+
runs-on: ubuntu-latest
136+
steps:
137+
- name: Checkout repository
138+
uses: actions/checkout@v4
139+
140+
- name: Static Analysis & Tests
141+
uses: ./.github/actions/flutter_analysis_and_tests
142+
with:
143+
working-directory: ./vanilla
45144
read_coverage:
46145
name: Read Combined Coverage Files
47146
runs-on: ubuntu-latest
48-
needs: [todos_repository_local_storage, vanilla, inherited_widget]
147+
needs:
148+
- change_notifier_provider
149+
- inherited_widget
150+
- mobx
151+
- mvi_base
152+
- mvi_flutter
153+
- redux
154+
- scoped_model
155+
- signals
156+
- simple_bloc_flutter
157+
- simple_blocs
158+
- todos_repository_local_storage
159+
- vanilla
49160
steps:
50161
- name: Checkout repository
51162
uses: actions/checkout@v4

0 commit comments

Comments
 (0)