-
-
Notifications
You must be signed in to change notification settings - Fork 31
116 lines (105 loc) · 3.3 KB
/
flutter_package.yaml
File metadata and controls
116 lines (105 loc) · 3.3 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#Source: https://github.com/VeryGoodOpenSource/very_good_workflows/blob/v1/.github/workflows/flutter_package.yml
name: Oidc Flutter Package Workflow
on:
workflow_call:
inputs:
analyze_directories:
required: false
type: string
default: "lib test"
concurrency:
required: false
type: number
default: 4
coverage_excludes:
required: false
type: string
default: ""
flutter_channel:
required: false
type: string
default: "stable"
flutter_version:
required: false
type: string
default: "3.22.0"
min_coverage:
required: false
type: number
default: 100
runs_on:
required: false
type: string
default: "ubuntu-latest"
setup:
required: false
type: string
default: ""
test_optimization:
required: false
type: boolean
default: true
test_recursion:
required: false
type: boolean
default: false
working_directory:
required: false
type: string
default: "."
run_tests:
required: false
type: boolean
default: true
custom_tests:
required: false
type: string
default: ""
jobs:
build:
defaults:
run:
working-directory: ${{inputs.working_directory}}
runs-on: ${{inputs.runs_on}}
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v6
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{inputs.flutter_version}}
channel: ${{inputs.flutter_channel}}
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: 📦 Install Dependencies
run: |
flutter pub global activate very_good_cli
- uses: bluefireteam/melos-action@v3
- name: ⚙️ Run Setup
if: "${{inputs.setup != ''}}"
run: ${{inputs.setup}}
- name: ✨ Check Formatting
run: dart format --set-exit-if-changed lib test
- name: 🕵️ Analyze
continue-on-error: true
run: flutter analyze ${{inputs.analyze_directories}}
- name: 🧪 Run Tests
if: ${{ inputs.run_tests }}
run: very_good test -j ${{inputs.concurrency}} ${{(inputs.test_recursion && '--recursive') || ''}} ${{(inputs.test_optimization && '--optimization') || '--no-optimization'}} --coverage --test-randomize-ordering-seed random
- name: 🧪 Run Custom Tests
if: "${{inputs.custom_tests != ''}}"
run: ${{inputs.custom_tests}}
- name: Report to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: ${{ inputs.run_tests }}
with:
files: ${{inputs.working_directory}}/coverage/lcov.info
fail_ci_if_error: false
# - name: 📊 Check Code Coverage
# uses: VeryGoodOpenSource/very_good_coverage@v2
# with:
# path: ${{inputs.working_directory}}/coverage/lcov.info
# exclude: ${{inputs.coverage_excludes}}
# min_coverage: ${{inputs.min_coverage}}