-
Notifications
You must be signed in to change notification settings - Fork 12
103 lines (78 loc) · 2.29 KB
/
main.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
name: Zap
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
PUB_ENVIRONMENT: bot.github
jobs:
get_dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- uses: ./.github/actions/cache_pub
- name: Get dependencies
run: dart run tools/bin/pub_get.dart
zap:
runs-on: ubuntu-latest
needs: [get_dependencies]
defaults:
run:
working-directory: zap
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- uses: ./.github/actions/cache_pub
- run: dart pub get --offline
- name: Ensure formatted
run: dart format -o none --set-exit-if-changed .
- name: Run build
run: dart run build_runner build --verbose
- name: Static analysis
run: dart analyze --fatal-infos --fatal-warnings
- name: Test
run: dart run build_runner test
riverpod_zap:
runs-on: ubuntu-latest
needs: [get_dependencies]
defaults:
run:
working-directory: riverpod_zap
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- uses: ./.github/actions/cache_pub
- run: dart pub get --offline
working-directory: riverpod_zap
- run: dart pub get --offline
working-directory: riverpod_zap/example
- name: Ensure formatted
run: dart format -o none --set-exit-if-changed .
- name: Run build
run: dart pub run build_runner build
- name: Run build in example
working-directory: riverpod_zap/example
run: dart pub run build_runner build
- name: Static analysis
run: dart analyze --fatal-infos --fatal-warnings
- name: Test
run: dart run build_runner test
zap_dev:
runs-on: ubuntu-latest
needs: [get_dependencies]
defaults:
run:
working-directory: zap_dev
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- uses: ./.github/actions/cache_pub
- run: dart pub get --offline
- name: Ensure formatted
run: dart format -o none --set-exit-if-changed .
- name: Static analysis
run: dart analyze --fatal-infos --fatal-warnings
- name: Test
run: dart test