-
Notifications
You must be signed in to change notification settings - Fork 124
211 lines (186 loc) · 5.64 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
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
name: CI
on:
pull_request:
push:
jobs:
unit-tests:
runs-on: ubuntu22-4x16
services:
storage-ftp:
image: garethflowers/ftp-server:0.7.0
env:
FTP_USER: user
FTP_PASS: '123'
ports:
- '20-21:20-21'
- '40000-40009:40000-40009'
storage-sftp:
image: atmoz/sftp:alpine
env:
SFTP_USERS: user:123:::upload
ports:
- '2222:22'
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
timeout-minutes: 10
- name: Build
run: |
./node_modules/.bin/tsc --build \
packages/api-console-module/tsconfig.json \
packages/broker/tsconfig.json \
packages/bson/tsconfig.json \
packages/core/tsconfig.json \
packages/core-rxjs/tsconfig.json \
packages/filesystem/tsconfig.json \
packages/framework/tsconfig.json \
packages/framework-debug-api/tsconfig.json \
packages/framework-integration/tsconfig.json \
packages/orm-browser-api/tsconfig.json \
packages/rpc/tsconfig.json \
packages/event/tsconfig.json \
packages/workflow/tsconfig.json \
packages/stopwatch/tsconfig.json \
packages/injector/tsconfig.json \
packages/app/tsconfig.json \
packages/http/tsconfig.json \
packages/orm/tsconfig.json \
packages/sql/tsconfig.json \
packages/sqlite/tsconfig.json \
packages/topsort/tsconfig.json \
packages/type/tsconfig.json \
packages/type-spec/tsconfig.json
- name: Test
run: |
npm run test:coverage \
packages/broker/ \
packages/bson/ \
packages/core/ \
packages/core-rxjs/ \
packages/filesystem/ \
packages/framework/ \
packages/framework-debug-api/ \
packages/framework-integration/ \
packages/rpc/ \
packages/topsort/ \
packages/event/ \
packages/http/ \
packages/injector/ \
packages/logger/ \
packages/template/ \
packages/sql/ \
packages/stopwatch/ \
packages/workflow/ \
packages/type/
- name: Send coverage
run: ./node_modules/.bin/codecov -f coverage/*.json
orm-postgres:
needs:
- unit-tests
runs-on: ubuntu22-4x16
strategy:
matrix:
postgres-version: [14]
services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ''
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- '5432:5432'
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
timeout-minutes: 10
- name: Build
run: |
./node_modules/.bin/tsc --build packages/postgres/tsconfig.json;
- name: Test
run: npm run test:coverage packages/postgres/
- name: Send coverage
run: ./node_modules/.bin/codecov -f coverage/*.json
orm-mysql:
needs:
- unit-tests
runs-on: ubuntu22-4x16
strategy:
matrix:
mysql-version: [8.0]
services:
mysql:
image: 'mysql:${{ matrix.mysql-version }}'
options: >-
--health-cmd "mysqladmin ping --silent"
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes
-e MYSQL_DATABASE=default
ports:
- '3306:3306'
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
timeout-minutes: 10
- name: Build
run: |
./node_modules/.bin/tsc --build packages/mysql/tsconfig.json
- name: Test
run: npm run test:coverage packages/mysql/
- name: Send coverage
run: ./node_modules/.bin/codecov -f coverage/*.json
orm-sqlite:
needs:
- unit-tests
runs-on: ubuntu22-4x16
steps:
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
timeout-minutes: 10
- name: Build
run: |
./node_modules/.bin/tsc --build packages/sqlite/tsconfig.json
- name: Test
run: npm run test:coverage packages/sqlite/
- name: Send coverage
run: ./node_modules/.bin/codecov -f coverage/*.json
orm-mongo:
needs:
- unit-tests
runs-on: ubuntu22-4x16
strategy:
matrix:
mongo-version: [4.0]
services:
# this is used for the simple-auth test
mongo:
image: mongo:5.0.10
ports:
- 27018:27017
env:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
MONGO_INITDB_DATABASE: root-db
volumes:
- /packages/mongo/tests/docker/simple-auth/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js
steps:
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongo-version }}
mongodb-replica-set: test-rs
- uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
timeout-minutes: 10
- name: Build
run: |
./node_modules/.bin/tsc --build packages/mongo/tsconfig.json
- name: Test
run: npm run test:coverage packages/mongo/
- name: Send coverage
run: ./node_modules/.bin/codecov -f coverage/*.json