forked from dart-backend/angel
-
Notifications
You must be signed in to change notification settings - Fork 0
167 lines (135 loc) · 5.43 KB
/
dart.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Angel3 CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
job_001:
name: Validate framework package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
with:
sdk: "3.4.0"
- id: angel3_container_upgrade
name: angel3_container; Upgrade depedencies
working-directory: packages/container/angel_container
run: dart pub upgrade
- name: angel3_container; Verify formatting
working-directory: packages/container/angel_container
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: angel3_container; Analyze source code
working-directory: packages/container/angel_container
run: dart analyze
- name: angel3_container; Run tests
working-directory: packages/container/angel_container
run: dart test
- id: angel3_framework_upgrade
name: angel3_framework; Upgrade depedencies
working-directory: packages/framework
run: dart pub upgrade
- name: angel3_framework; Verify formatting
working-directory: packages/framework
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: angel3_framework; Analyze source code
working-directory: packages/framework
run: dart analyze
- name: angel3_framework; Run tests
working-directory: packages/framework
run: dart test
job_002:
name: Validate ORM packages
runs-on: ubuntu-latest
# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
with:
sdk: "3.4.0"
# Angel3 ORM
- id: angel3_orm_upgrade
name: angel3_orm; Upgrade depedencies
working-directory: packages/orm/angel_orm
run: dart pub upgrade
- name: angel3_orm; Verify formatting
working-directory: packages/orm/angel_orm
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: angel3_orm; Analyze source code
working-directory: packages/orm/angel_orm
run: dart analyze
# Angel3 ORM Generator
- id: angel3_orm_generator_upgrade
name: angel3_orm_generator; Upgrade depedencies
working-directory: packages/orm/angel_orm_generator
run: dart pub upgrade
- name: angel3_orm_generator; Verify formatting
working-directory: packages/orm/angel_orm_generator
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: angel3_orm_generator; Analyze source code
working-directory: packages/orm/angel_orm_generator
run: dart analyze
# Angel3 ORM Test
- id: angel3_orm_test_upgrade
name: angel3_orm_test; Upgrade depedencies
working-directory: packages/orm/angel_orm_test
run: dart pub upgrade
- name: angel3_orm_test; Run orm code generator
working-directory: packages/orm/angel_orm_test
run: dart run build_runner build --delete-conflicting-outputs
- name: angel3_orm_test; Verify formatting
working-directory: packages/orm/angel_orm_test
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: angel3_orm_test; Analyze source code
working-directory: packages/orm/angel_orm_test
run: dart analyze
# Angel3 ORM PostgreSQL
- id: angel3_orm_postgres_upgrade
name: angel3_orm_postgres; Upgrade depedencies
working-directory: packages/orm/angel_orm_postgres
run: dart pub upgrade
- name: angel3_orm_postgres; Verify formatting
working-directory: packages/orm/angel_orm_postgres
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: angel3_orm_postgres; Analyze source code
working-directory: packages/orm/angel_orm_postgres
run: dart analyze
- name: angel3_orm_postgres; Run tests
working-directory: packages/orm/angel_orm_postgres
run: dart test
env:
# The hostname used to communicate with the PostgreSQL service container
POSTGRES_HOST: localhost
# The default PostgreSQL port
POSTGRES_PORT: 5432
POSTGRES_PASSWORD: postgres
POSTGRES_USERNAME: postgres
POSTGRES_DB: postgres