-
Notifications
You must be signed in to change notification settings - Fork 16
74 lines (57 loc) · 2.07 KB
/
dart.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Analysis and Code Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone the Repository
uses: actions/checkout@v4
- name: Install Tools
run: sudo apt update && sudo apt install lcov -y
- name: Reconfigure git to Use HTTP Authentication
run: >
git config --global url."https://github.com/".insteadOf '[email protected]:'
- name: Setup Flutter SDK
uses: flutter-actions/setup-flutter@v3
with:
channel: stable
version: 3.19.6
- name: Enable Flutter Desktop
run: flutter config --enable-linux-desktop
shell: bash
- name: Get Flutter Packages
run: flutter pub get
- name: Flutter Create
run: flutter create .
- name: Clone Mozilla's CA cert bundle module into root directory
run: git clone https://github.com/Chia-Network/mozilla-ca.git
- name: Configure Linux Build
run: |
sudo apt install libgtk-3-dev libgtk-3-0 libblkid1 liblzma5 ninja-build libmpv-dev mpv -y
sudo mkdir -p /usr/local/chia_crypto_utils && sudo chmod 777 /usr/local/chia_crypto_utils
- name: Check Flutter Readiness
run: flutter doctor
- name: Run Integration Tests
run: |
export DISPLAY=:99
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
sudo apt install network-manager
./integration_test/run_tests.sh
shell: bash
- name: Run Unit Tests
run: flutter test test --coverage --coverage-path=coverage/test.info
- name: Merge Coverage Files
run: |
lcov --add-tracefile coverage/test.info --add-tracefile coverage/integration_test.info --output-file coverage/merged_coverage.info
rm -rf coverage/*test.info
- name: Generate Coverage Report
run: genhtml coverage/merged_coverage.info -o coverage
- name: Upload code coverage to GitHub
uses: actions/upload-artifact@27121b0bdffd731efa15d66772be8dc71245d074
with:
name: code-coverage
path: coverage