-
Notifications
You must be signed in to change notification settings - Fork 64
63 lines (50 loc) · 1.47 KB
/
hook.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
53
54
55
56
57
58
59
60
61
62
# CI for the native_* packages.
#
# Combined into a single workflow so that deps are configured and installed once.
name: hook
permissions: read-all
on:
pull_request:
# No `branches:` to enable stacked PRs on GitHub.
paths:
- ".github/workflows/hook.yaml"
- "pkgs/hook/**"
- "pkgs/code_assets/**"
- "pkgs/data_assets/**"
push:
branches: [main]
paths:
- ".github/workflows/native.yaml"
- "pkgs/hook/**"
- "pkgs/code_assets/**"
- "pkgs/data_assets/**"
schedule:
- cron: "0 0 * * 0" # weekly
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows]
sdk: [dev]
package: [hook, code_assets, data_assets]
runs-on: ${{ matrix.os }}-latest
defaults:
run:
working-directory: pkgs/${{ matrix.package }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94
with:
sdk: ${{ matrix.sdk }}
- run: dart pub get
- run: dart analyze --fatal-infos
- run: dart format --output=none --set-exit-if-changed .
- run: dart test
- run: |
dart tool/generate_schemas.dart
dart tool/generate_syntax.dart
dart tool/normalize.dart
git diff --exit-code
working-directory: pkgs/${{ matrix.package }}/
if: ${{ matrix.package == 'hook' && matrix.sdk == 'dev' }}