-
Notifications
You must be signed in to change notification settings - Fork 16
66 lines (51 loc) · 1.88 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
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@v1
- name: Install Tools
run: sudo apt update && sudo apt install lcov
- name: Clone the Flutter repository
uses: actions/checkout@v1
with:
repository: flutter/flutter
ref: 3.3.0
path: flutter
- name: Add the flutter tool to the path
run: |
ls -al "$GITHUB_WORKSPACE/../flutter/bin"
echo "$GITHUB_WORKSPACE/../flutter/bin" >> $GITHUB_PATH
echo "$GITHUB_WORKSPACE/../flutter/bin/cache/dart-sdk/bin" >> $GITHUB_PATH
- name: Populate the Flutter tool's cache of binary artifacts
run: |
flutter config --no-analytics
flutter precache
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf '[email protected]:'
- name: Get Flutter packages
run: flutter pub get
- name: Clone Mozilla's CA cert bundle module into root directory
run: git clone https://github.com/Chia-Network/mozilla-ca.git
- name: Run simulator tests
run: bash ./integration_test/run_tests.sh
- 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