forked from forus-labs/forui
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.35 KB
/
forui_hooks_build.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
name: Forui Hooks Build
on:
workflow_dispatch: {}
push:
paths:
- .github/workflows/forui_hooks_build.yaml
- forui_hooks/**
pull_request:
paths:
- forui_hooks/**
jobs:
test:
name: Build & test
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: forui_hooks
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
flutter-version: [ 3.x ]
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2.18.0
with:
flutter-version: ${{ matrix.flutter-version }}
cache: true
- working-directory: forui
run: |
flutter pub get
dart run build_runner build --delete-conflicting-outputs
- run: flutter pub get
- run: flutter analyze
- run: flutter test
- run: |
if output=$(dart doc --dry-run 2>&1); then
if echo "$output" | grep -q -i "warning:"; then
echo "Documentation warnings found:"
echo "$output" | grep -i "warning:"
exit 1
else
echo "No documentation warnings found!"
exit 0
fi
else
echo "Error: dart doc command failed"
echo "$output"
exit 1
fi
if: runner.os == 'Linux'