forked from mongoosejs/sample-apps
-
Notifications
You must be signed in to change notification settings - Fork 12
46 lines (44 loc) · 1.4 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
name: Test
on:
push:
permissions:
contents: read
jobs:
test-ecommerce:
runs-on: ${{ matrix.os }}
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: main
- name: Set up JSON API
run: |
chmod +x bin/start_json_api.sh
bin/start_json_api.sh -t v2.0.13 -j v1.0.0-ALPHA-9
working-directory: stargate-mongoose
- name: Wait for services
run: |
while ! nc -z localhost 8080; 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 test
working-directory: netlify-functions-ecommerce