-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (64 loc) · 2.19 KB
/
main.yaml
File metadata and controls
80 lines (64 loc) · 2.19 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
name: test
# Triggers the workflow on push or pull request on all branches
# and allows you to run this workflow manually from the Actions tab
on: [push, pull_request, workflow_dispatch]
jobs:
flutter-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install packages
run: flutter pub get
- name: Show flutter version
run: flutter --version
- name: Show dart version
run: dart --version
- name: Show dart format version
run: dart format --version
- name: Debug dart format issues
run: file lib/l10n/generated/app_localizations.dart
- name: Run full_coverage to generate test/full_coverage_test.dart
run: |
dart pub global activate full_coverage
dart pub global run full_coverage
- name: Ensure standard dart formatting
run: |
# TODO resolve this strange issue where dart format wants to change one file on every run (but not on local machine)
# dart format --output=none --set-exit-if-changed .
dart format .
git diff
- name: Run linters
run: |
# TODO clean up the dart analyzer info stuff
# dart analyze --fatal-infos
dart analyze
- name: Run all tests and generate coverage information in coverage/lcov.info
run: flutter test --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage/lcov.info
verbose: true
integration_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install packages
run: flutter pub get
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: run integration test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86_64
script: flutter test integration_test