-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (63 loc) · 1.93 KB
/
main.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
66
67
68
69
70
71
72
73
74
75
76
77
78
name: sudoku
concurrency:
group: $-$
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
semantic-pull-request:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
spell-check:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
with:
includes: |
**/*.md
modified_files_only: false
build:
defaults:
run:
working-directory: .
runs-on: "ubuntu-latest"
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.22.1"
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: 🤫 Set SSH Key
env:
ssh_key: ""
if: env.ssh_key != null
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ""
- name: 📦 Install Dependencies
run: |
flutter pub global activate very_good_cli
very_good packages get --recursive --ignore="!*"
- name: ⚙️ Run Setup
run: |
echo "${{ secrets.ENV_FILE }}" > .env
echo "${{ secrets.ENV_GENERATED_FILE }}" > lib/env/env.g.dart
dart format lib/env/env.g.dart
- name: ✨ Check Formatting
run: dart format --line-length 80 --set-exit-if-changed lib test
- name: 🕵️ Analyze
run: flutter analyze lib test
- name: 🧪 Run Tests
run: very_good test -j 4 --optimization --coverage --test-randomize-ordering-seed random
- name: 📊 Check Code Coverage
uses: VeryGoodOpenSource/very_good_coverage@v3
with:
path: ./coverage/lcov.info
exclude: "**.g.dart"
min_coverage: 100