Skip to content

Commit 6c96629

Browse files
authored
feat: Added Github Actions Step Name & Organized Sequence (#154)
1 parent c27450f commit 6c96629

File tree

1 file changed

+36
-13
lines changed

1 file changed

+36
-13
lines changed
Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,42 @@
1-
# This workflow builds, analyses and tests every pull request.
1+
# This workflow builds, analyzes, and tests every pull request.
22
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+
412
jobs:
513
analyze-and-test:
614
runs-on: ubuntu-latest
715
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
1021
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

0 commit comments

Comments
 (0)