-
Notifications
You must be signed in to change notification settings - Fork 159
47 lines (40 loc) · 1.35 KB
/
checks.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
# Checks that are run on every commit to main and every pull request.
name: Checks
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check_package:
name: packages/${{ matrix.package }}
runs-on: macos-latest
strategy:
matrix:
package: [google_fonts, dynamic_color, adaptive_breakpoints, adaptive_navigation, adaptive_components, symbols]
steps:
- name: Checkout code
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Install Flutter
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # v2.10.0
with:
channel: beta
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
- name: Get packages
run: flutter pub get
working-directory: packages/${{ matrix.package }}
- name: Analyze Dart code
run: flutter analyze
working-directory: packages/${{ matrix.package }}
- name: Ensure Dart code is formatted correctly
run: dart format --set-exit-if-changed .
working-directory: packages/${{ matrix.package }}
- name: Run Flutter unit tests
run: flutter test
working-directory: packages/${{ matrix.package }}