forked from mongoosejs/sample-apps
-
Notifications
You must be signed in to change notification settings - Fork 12
190 lines (181 loc) · 5.99 KB
/
test.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
name: Test
on:
push:
pull_request:
permissions:
contents: read
jobs:
test-discord-bot:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node: [18]
os: [ubuntu-20.04]
name: Discord Bot Sample App
steps:
## Set up Stargate
- name: disable and stop mono-xsp4.service
run: |
sudo kill -9 $(sudo lsof -t -i:8084)
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
repository: stargate/stargate-mongoose
path: stargate-mongoose
ref: vkarpov15/astra-stargate-example
- name: Build stargate-mongoose
run: |
npm install
npm run build
node ./bin/create-tarball
working-directory: stargate-mongoose
- name: Set up JSON API
run: |
chmod +x bin/start_data_api.sh
bin/start_data_api.sh
working-directory: stargate-mongoose
- name: Wait for services
run: |
while ! nc -z localhost 8181; do sleep 1; done
while ! nc -z localhost 8081; do sleep 1; done
working-directory: stargate-mongoose
## Set up and run discord bot sample app tests
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Setup node
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.1.1
with:
node-version: ${{ matrix.node }}
- run: npm install
working-directory: discord-bot
- run: npm run lint
working-directory: discord-bot
- run: npm test
working-directory: discord-bot
test-ecommerce:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node: [16]
os: [ubuntu-20.04]
name: Ecommerce Sample App
steps:
## Set up Stargate
- name: disable and stop mono-xsp4.service
run: |
sudo kill -9 $(sudo lsof -t -i:8084)
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
repository: stargate/stargate-mongoose
path: stargate-mongoose
ref: vkarpov15/astra-stargate-example
- name: Build stargate-mongoose
run: |
npm install
npm run build
node ./bin/create-tarball
working-directory: stargate-mongoose
- name: Set up JSON API
run: |
chmod +x bin/start_data_api.sh
bin/start_data_api.sh
working-directory: stargate-mongoose
- name: Wait for services
run: |
while ! nc -z localhost 8181; do sleep 1; done
while ! nc -z localhost 8081; do sleep 1; done
working-directory: stargate-mongoose
## Set up and run ecommerce sample app tests
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Setup node
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.1.1
with:
node-version: ${{ matrix.node }}
- run: npm install
working-directory: netlify-functions-ecommerce
- run: npm run lint
working-directory: netlify-functions-ecommerce
- run: npm test
working-directory: netlify-functions-ecommerce
test-reviews:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node: [16]
os: [ubuntu-20.04]
name: Reviews Sample App
steps:
## Set up Stargate
- name: disable and stop mono-xsp4.service
run: |
sudo kill -9 $(sudo lsof -t -i:8084)
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
repository: stargate/stargate-mongoose
path: stargate-mongoose
ref: main
- name: Set up JSON API
run: |
chmod +x bin/start_data_api.sh
bin/start_data_api.sh
working-directory: stargate-mongoose
- name: Wait for services
run: |
while ! nc -z localhost 8181; do sleep 1; done
while ! nc -z localhost 8081; do sleep 1; done
working-directory: stargate-mongoose
## Set up and run reviews sample app tests
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Setup node
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.1.1
with:
node-version: ${{ matrix.node }}
- run: npm install
working-directory: typescript-express-reviews
- run: npm run build
working-directory: typescript-express-reviews
- run: npm test
working-directory: typescript-express-reviews
test-photograhy:
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
node: [16]
os: [ubuntu-20.04]
name: Photography Sample App
steps:
## Set up Stargate
- name: disable and stop mono-xsp4.service
run: |
sudo kill -9 $(sudo lsof -t -i:8084)
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
repository: stargate/stargate-mongoose
path: stargate-mongoose
ref: main
- name: Set up JSON API
run: |
chmod +x bin/start_data_api.sh
bin/start_data_api.sh
working-directory: stargate-mongoose
- name: Wait for services
run: |
while ! nc -z localhost 8181; do sleep 1; done
while ! nc -z localhost 8081; do sleep 1; done
working-directory: stargate-mongoose
## Set up and run reviews sample app tests
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Setup node
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3.1.1
with:
node-version: ${{ matrix.node }}
- run: npm install
working-directory: photography-site-demo.js
- run: npm test
working-directory: photography-site-demo.js