-
Notifications
You must be signed in to change notification settings - Fork 534
52 lines (49 loc) Β· 1.61 KB
/
Copy pathtest.yml
File metadata and controls
52 lines (49 loc) Β· 1.61 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
name: CI Flutter Packages
on:
pull_request:
push:
branches: [main]
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v7
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
auto_animated:
- 'packages/auto_animated/**'
epub_view:
- 'packages/epub_view/**'
explorer:
- 'packages/explorer/**'
flutter_color:
- 'packages/flutter_color/**'
pdfx:
- 'packages/pdfx/**'
test:
needs: detect-changes
if: ${{ needs.detect-changes.outputs.packages != '[]' }}
# pdfx has no Linux support (see lib/src/renderer/has_pdf_support.dart), so it needs a
# runner for one of its supported platforms; macOS covers macOS/iOS-class PDF support.
runs-on: ${{ matrix.package == 'pdfx' && 'macos-latest' || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
package: ${{ fromJson(needs.detect-changes.outputs.packages) }}
steps:
- uses: actions/checkout@v7
- uses: subosito/flutter-action@v2
with:
channel: stable
- run: flutter pub get
working-directory: packages/${{ matrix.package }}
- run: dart format --output=none --set-exit-if-changed .
working-directory: packages/${{ matrix.package }}
- run: flutter analyze --fatal-infos
working-directory: packages/${{ matrix.package }}
- run: flutter test
working-directory: packages/${{ matrix.package }}