-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (35 loc) · 1.23 KB
/
build.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
47
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Flutter build and test
on: push
env:
FLUTTER_FOLDER: '$HOME/flutter'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Flutter
id: cache-flutter
uses: actions/cache@v3
with:
path: |
flutter
~/.pub-cache
key: flutter-${{ hashFiles('**/pubspec.lock') }}
- if: ${{ steps.cache-flutter.outputs.cache-hit != 'true' }}
name: Install Flutter
run: git clone https://github.com/flutter/flutter.git --depth 1 -b stable $FOLDER
- name: Add Flutter to PATH
run: echo "$GITHUB_WORKSPACE/flutter/bin" >> $GITHUB_PATH
- if: ${{ steps.cache-flutter.outputs.cache-hit != 'true' }}
name: Install dependencies
run: flutter pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed lib/** test/**
- name: Analyze project source
run: flutter analyze --no-fatal-infos lib/ test/
- name: Run tests
run: flutter test