File tree Expand file tree Collapse file tree 1 file changed +36
-13
lines changed Expand file tree Collapse file tree 1 file changed +36
-13
lines changed Original file line number Diff line number Diff line change 1
- # This workflow builds, analyses and tests every pull request.
1
+ # This workflow builds, analyzes, and tests every pull request.
2
2
name : Pull Request Validation
3
- on : pull_request
3
+ on :
4
+ push :
5
+ branches :
6
+ - develop
7
+ - main
8
+ - master
9
+
10
+ pull_request :
11
+
4
12
jobs :
5
13
analyze-and-test :
6
14
runs-on : ubuntu-latest
7
15
steps :
8
- - uses : actions/checkout@v1
9
- - uses : actions/setup-java@v1
16
+ - name : 📚 Git Checkout
17
+ uses : actions/checkout@v4
18
+
19
+ - name : 🐦 Setup Flutter
20
+ uses : subosito/flutter-action@v2
10
21
with :
11
- java-version : " 12.x"
12
- - uses : subosito/flutter-action@v1
13
- with :
14
- channel : " stable"
15
- - run : flutter pub get
16
- - run : flutter pub run build_runner build --delete-conflicting-outputs
17
- - run : flutter build apk --release --flavor production -t lib/main_production.dart
18
- - run : flutter analyze
19
- - run : flutter test
22
+ channel : ' stable'
23
+ cache : true
24
+ cache-key : flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
25
+
26
+ - name : 📦 Install Dependencies
27
+ run : flutter pub get
28
+
29
+ - name : 🛠️ Build Runner (Generate Code)
30
+ run : flutter pub run build_runner build --delete-conflicting-outputs
31
+
32
+ - name : 🕵️ Analyze Code
33
+ run : flutter analyze lib test
34
+
35
+ - name : ✨ Check Formatting
36
+ run : dart format --line-length 80 --set-exit-if-changed lib test
37
+
38
+ - name : 🏗️ Build APK (Production Flavor)
39
+ run : flutter build apk --release --flavor production -t lib/main_production.dart
40
+
41
+ - name : 🧪 Run Tests
42
+ run : flutter test
You can’t perform that action at this time.
0 commit comments