Skip to content

Commit 71e86b9

Browse files
committed
ci: update environment
- Test against MongoDB v3.6 and v5.0 - fix Travis CI config Signed-off-by: Rifa Achrinza <[email protected]>
1 parent 06b7239 commit 71e86b9

File tree

5 files changed

+13020
-21
lines changed

5 files changed

+13020
-21
lines changed

.github/workflows/continuous-integration.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ jobs:
1616
strategy:
1717
matrix:
1818
node-version: [10, 12, 14]
19-
mongodb-version: [4.4] # the latest stable version
19+
mongodb-version: [3.6, 4.4, 5.0]
20+
fail-fast: false
2021

2122
steps:
2223
- uses: actions/checkout@v2

.npmrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
package-lock=false
1+
package-lock=true
2+
scripts-prepend-node-path=true

.travis.yml

+24-18
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1+
branches:
2+
only: 5.x
3+
arch: arm64
4+
services: docker
15
language: node_js
26
node_js:
3-
- "10"
4-
- "12"
5-
- "14"
6-
7+
- 10
8+
- 12
9+
- 14
710
env:
8-
- CXX=g++-4.8
9-
addons:
10-
apt:
11-
sources:
12-
- ubuntu-toolchain-r-test
13-
- mongodb-3.2-precise
14-
packages:
15-
- g++-4.8
16-
- mongodb-org-server
17-
- mongodb-org-shell
18-
services:
19-
- mongodb
20-
21-
after_success: npm run coverage
11+
- MONGO_VERSION=3.6
12+
- MONGO_VERSION=4.4
13+
- MONGO_VERSION=5.0
14+
before_install: |
15+
docker run --name=mongodb --publish=27017:27017 --detach mongo:"$MONGO_VERSION"
16+
until docker exec --tty mongodb mongo --port=27017 --eval='db.serverStatus()'
17+
do
18+
sleep 1
19+
echo "."
20+
TIMER="$(TIMER + 1)"
21+
if [ "$TIMER" -eq 20 ]; then
22+
echo "MongoDB did not initialize within 20 seconds. Exiting."
23+
exit 2
24+
fi
25+
done
26+
install: npm ci --ignore-scripts
27+
script: npm run-script test:ci

0 commit comments

Comments
 (0)