Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update environment #668

Open
wants to merge 3 commits into
base: 5.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions .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]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to https://www.mongodb.com/support-policy/lifecycles, mongodb v3.6 has reached EOL last April. Do we still want to include that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since connector 5.x was released when MongoDB 3.x was still supported, I wanted to make sure it still works with that version (i.e. Dropping a MongoDB version should require a semver major on the connector as well).

fail-fast: false

steps:
- uses: actions/checkout@v2
Expand All @@ -30,8 +31,10 @@ jobs:
with:
mongodb-version: ${{ matrix.mongodb-version }}

- run: npm install
- run: npm test
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Run tests
run: npm run-script test:ci

code-lint:
name: Code Lint
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