-
Notifications
You must be signed in to change notification settings - Fork 158
38 lines (32 loc) · 1.01 KB
/
analyze-tests.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
# Run Flutter analyzer and all tests when a PR points to `main`.
name: Analyze & Tests
on:
pull_request:
branches:
- main
env:
flutter_version: "2.10.3"
flutter_channel: "stable"
jobs:
analyze-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Caches Flutter repository so it can be reused by future workflows run
- name: Cache Flutter
uses: actions/cache@v2
with:
path: /opt/hostedtoolcache/flutter
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}
# Setup Flutter SDK with version `env.flutter_version`
- name: Setup Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
# Run pre-requisites to build both applications (iOS and Android)
- name: Analyze and run tests
run: |
flutter analyze .
flutter test test