-
-
Notifications
You must be signed in to change notification settings - Fork 19
56 lines (54 loc) · 1.5 KB
/
analyze-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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Analyze & Test
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
jobs:
code-analysis-and-unit-test:
runs-on: macos-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter analyze
- run: flutter test -r expanded
e2e-test:
runs-on: macos-latest
timeout-minutes: 45
strategy:
matrix:
api-level: [29, 30, 31]
steps:
- name: checkout
uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: run tests
uses: ReactiveCircus/[email protected]
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
script: |
flutter drive --target=test_driver/app.dart --driver=test_driver/key_new.dart
flutter drive --target=test_driver/app.dart --driver=test_driver/key_imported.dart
# - name: Upload screenshots
# if: failure()
# uses: actions/upload-artifact@v3
# with:
# name: screenshot-${{ matrix.api-level }}
# path: fail-screenshots/${{ matrix.api-level }}/
# retention-days: 5