on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    # services:
    #         mongodb:
    #             image: mongo:4.2.3
    #             command: --setParameter ttlMonitorSleepSecs=2
    #             ports:
    #               - 27017:27017
    strategy:
      matrix:
        node-version: [8.x, 10.x, 12.x, 13.x]

    steps:
      - uses: actions/checkout@v1

      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: Install mongo
        run: | 
          wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-$MONGODB_VERSION.tgz
          tar xfz mongodb-linux-x86_64-$MONGODB_VERSION.tgz
          export PATH=`pwd`/mongodb-linux-x86_64-$MONGODB_VERSION/bin:$PATH
          mkdir -p data/db
          sudo mongod --dbpath=data/db --setParameter ttlMonitorSleepSecs=2 &
          sleep 5
      - name: Install
        run: |
          npm install
      - name: Run tests
        run: |
          npm run test
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    # services:
    #         mongodb:
    #             image: mongo:4.2.3
    #             command: --setParameter ttlMonitorSleepSecs=2
    #             ports:
    #               - 27017:27017
    strategy:
      matrix:
        node-version: [8.x, 10.x, 12.x, 13.x]

    steps:
      - uses: actions/checkout@v1

      - name: Use Node.js
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: Install mongo
        run: | 
          docker run --name mongo -d -p 27017:27017 mongo:latest mongo --setParameter ttlMonitorSleepSecs=2
      - name: Install
        run: |
          npm install
      - name: Run tests
        run: |
          npm run test
Use docker instead of wget
fix: Use docker instead of wget
