-
-
Notifications
You must be signed in to change notification settings - Fork 12
37 lines (33 loc) · 1.1 KB
/
flutter_test.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
# Run all main Flutter style and test checks
name: Main Flutter checks
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
flutter_channel: "any"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Parse fvm to set flutter version
run: echo "flutter_version=$(cat .fvm/fvm_config.json | jq -r .flutterSdkVersion)" >> $GITHUB_ENV
- name: Cache Flutter
uses: actions/cache@v3
with:
path: /opt/hostedtoolcache/flutter
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}-${{ env.flutter_channel }}
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
- run: flutter pub get
- name: dart format
run: dart format --set-exit-if-changed lib test
- run: flutter analyze lib test
- name: flutter test
run: flutter test --no-pub --coverage