Skip to content

Commit

Permalink
ci: update environment
Browse files Browse the repository at this point in the history
- Test against MongoDB v3.6 and v5.0
- fix Travis CI config

Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
  • Loading branch information
achrinza committed Apr 20, 2022
1 parent 06b7239 commit 71e86b9
Show file tree
Hide file tree
Showing 5 changed files with 13,020 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
strategy:
matrix:
node-version: [10, 12, 14]
mongodb-version: [4.4] # the latest stable version
mongodb-version: [3.6, 4.4, 5.0]
fail-fast: false

steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
package-lock=false
package-lock=true
scripts-prepend-node-path=true
42 changes: 24 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
branches:
only: 5.x
arch: arm64
services: docker
language: node_js
node_js:
- "10"
- "12"
- "14"

- 10
- 12
- 14
env:
- CXX=g++-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- mongodb-3.2-precise
packages:
- g++-4.8
- mongodb-org-server
- mongodb-org-shell
services:
- mongodb

after_success: npm run coverage
- MONGO_VERSION=3.6
- MONGO_VERSION=4.4
- MONGO_VERSION=5.0
before_install: |
docker run --name=mongodb --publish=27017:27017 --detach mongo:"$MONGO_VERSION"
until docker exec --tty mongodb mongo --port=27017 --eval='db.serverStatus()'
do
sleep 1
echo "."
TIMER="$(TIMER + 1)"
if [ "$TIMER" -eq 20 ]; then
echo "MongoDB did not initialize within 20 seconds. Exiting."
exit 2
fi
done
install: npm ci --ignore-scripts
script: npm run-script test:ci

0 comments on commit 71e86b9

Please sign in to comment.