fix: package.json to reduce vulnerabilities #117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI test | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-16.04 | |
strategy: | |
matrix: | |
node-version: [12.x] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install | |
- name: Install MongoDB | |
run: | | |
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - | |
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org | |
sudo apt-get install -y --allow-downgrades mongodb-org=4.4.0 mongodb-org-server=4.4.0 mongodb-org-shell=4.4.0 mongodb-org-mongos=4.4.0 mongodb-org-tools=4.4.0 | |
- name: Start MongoDB | |
run: sudo systemctl start mongod | |
- name: Run Tests | |
run: npm run-script test-ci | |
- name: Send Coverage | |
run: npm run-script coverage |