-
Notifications
You must be signed in to change notification settings - Fork 21
46 lines (36 loc) · 1.1 KB
/
pull_request_validation.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
# This workflow builds, analyzes, and tests every pull request.
name: Pull Request Validation
on:
push:
branches:
- develop
- main
- master
pull_request:
jobs:
analyze-and-test:
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: ♨️ Setup Java
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: 🛎️ Checking Flutter Version
run: flutter --version
- name: 📦 Install Dependencies
run: flutter pub get
- name: 🛠️ Build Runner (Generate Code)
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: 🕵️ Analyze Code
run: flutter analyze lib test
- name: 🏗️ Build APK (Production Flavor)
run: flutter build apk --release --flavor production -t lib/main_production.dart
- name: 🧪 Run Tests
run: flutter test