-
-
Notifications
You must be signed in to change notification settings - Fork 1
108 lines (90 loc) · 2.59 KB
/
build.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
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
name: Build Drules
on:
push:
branches:
- main
paths-ignore:
- "README.md"
pull_request:
branches:
- main
paths-ignore:
- "README.md"
jobs:
test_linux:
name: Build Drules on Ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install lcov
run: sudo apt-get update -qq -y && sudo apt-get install lcov
- name: Setup Build System
shell: bash
run: |
chmod +x ./.github/workflows/scripts/install-tools.sh
./.github/workflows/scripts/install-tools.sh
- name: Install dependencies
run: dart pub get
- name: Test Drules
run: |
dart run build_runner build --delete-conflicting-outputs
dart test --coverage=./coverage
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
- name: Upload coverage
if: github.ref == 'refs/heads/main'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
file: coverage/lcov.info
test_macos:
name: Build Nitrite on MacOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Setup Build System
shell: bash
run: |
chmod +x ./.github/workflows/scripts/install-tools.sh
./.github/workflows/scripts/install-tools.sh
- name: Install dependencies
run: dart pub get
- name: Test Drules
run: |
dart run build_runner build --delete-conflicting-outputs
dart test
test_windows:
name: Build Nitrite on Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Setup Build System
shell: cmd
run: .\.github\workflows\scripts\install-tools.bat
- name: Install dependencies
run: dart pub get
- name: Test Drules
run: |
dart run build_runner build --delete-conflicting-outputs
dart test