-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (62 loc) · 1.91 KB
/
flutter.analyze-test.action.yaml
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
57
58
59
60
61
62
63
64
65
name: Flutter - Analyze & Test
on:
workflow_call:
inputs:
flutter_version:
description: 'The Flutter used (ex: 2.5.1)'
required: true
type: string
jobs:
analyze:
name: 'Analyze'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v4
- name: 'Setup flutter action'
uses: subosito/flutter-action@v2.16.0
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Flutter analyze'
run: |
flutter config --no-analytics
flutter config --no-cli-animations
flutter analyze
format:
name: 'Format'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v4
- name: 'Setup flutter action'
uses: subosito/flutter-action@v2.16.0
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Flutter format'
run: dart format lib --set-exit-if-changed
test:
name: 'Test'
runs-on: ubuntu-latest
steps:
- name: 'Checkout source code'
uses: actions/checkout@v4
- name: 'Decrypt secret configuration'
run: ./.github/scripts/decrypt_secret.sh
env:
PASSPHRASE: ${{ secrets.PASSPHRASE }}
- name: 'Check secret configuration'
run: ./.github/scripts/check_secrets_decryption.sh
- name: 'Setup flutter action'
uses: subosito/flutter-action@v2.16.0
with:
flutter-version: ${{ inputs.flutter_version }}
- name: 'Flutter test (with coverage)'
run: |
flutter config --no-analytics
flutter config --no-cli-animations
flutter test --coverage --test-randomize-ordering-seed random
- name: 'Upload coverage report'
uses: codecov/codecov-action@v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/