File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ Dockerfile
22docker-compose.yml
33.dockerignore
44.git
5+ .github
56.gitignore
Original file line number Diff line number Diff line change 1+ name : E2E Test
2+ on : [push, pull_request]
3+
4+ jobs :
5+ e2e-test :
6+ name : Node.js
7+ runs-on : ubuntu-latest
8+
9+ strategy :
10+ fail-fast : false
11+ matrix :
12+ node-version : ["10.x", "12.x", "14.x"]
13+
14+ steps :
15+ - name : Checkout https://github.com/${{ github.repository }}@${{ github.ref }}
16+ uses : actions/checkout@v2
17+ with :
18+ persist-credentials : false
19+
20+ - name : Set up Node.js ${{ matrix.node-version }}
21+ uses : actions/setup-node@v1
22+ with :
23+ node-version : ${{ matrix.node-version }}
24+
25+ - name : Use cache
26+ uses : actions/cache@v2
27+ with :
28+ path : |
29+ ~/.npm
30+ ~/.cache
31+ key : ${{ runner.os }}-node${{ matrix.node-version }}-E2E-${{ hashFiles('package-lock.json') }}
32+
33+ - name : Install dependencies
34+ run : |
35+ npm ci
36+ npm run cy:verify
37+
38+ - name : Start MongoDB
39+ run : |
40+ docker run -d -p 27017:27017 mongo:4.0
41+ timeout 60s bash -c 'until nc -z -w 2 localhost 27017 && echo MongoDB ready; do sleep 2; done'
42+
43+ - name : Run E2E test suite
44+ run : |
45+ NODE_ENV=test npm start -- --silent &
46+ npm run test:ci
You can’t perform that action at this time.
0 commit comments