-
Notifications
You must be signed in to change notification settings - Fork 66
40 lines (37 loc) · 1.11 KB
/
main.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
name: Build, Test and Analyze
on: [ push, pull_request ]
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: subosito/[email protected]
with:
flutter-version: '3.10.5'
channel: 'stable'
cache: true
- name: Setup
run: |
flutter pub get
flutter pub run build_runner build --delete-conflicting-outputs
dart pub global activate protoc_plugin
chmod +x generate_protos.sh
./generate_protos.sh
- name: Static Analysis
run: flutter analyze
- name: Unit Tests
run: flutter test test/unit
- name: Widget Tests
run: flutter test test/widget
- name: Build release package
run: flutter build apk --release
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
name: apk
path: |
build/app/outputs/flutter-apk/app-release.apk