name: Node CI

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x]
        mongodb-version: [3.2, 4.2]

    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
      run: npm ci

    - name: Create server-config.js
      run: mv server-config.test.js server-config.js

    - name: Start MongoDB
      uses: superchargejs/mongodb-github-action@1.1.0
      with:
        mongodb-version: ${{ matrix.mongodb-version }}

    - name: Populate database
      run: node scripts/node/populate.js test/data/*.json && node scripts/node/resolve-lexeme-ids.js

    - name: Creating indexes
      run: node scripts/node/create-indexes.js

    - name: Build glosses collection
      run: cd scripts/node && ./run.js make-glosses-collection.js

    - name: Run tests
      run: npm test

name: Node CI

on: [push]

jobs:
  build:

    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x]
        mongodb-version: [3.2, 4.2]

    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
      run: npm ci

    - name: Create server-config.js
      run: mv server-config.test.js server-config.js

    - name: Start MongoDB
      uses: superchargejs/mongodb-github-action@1.1.0
      with:
        mongodb-version: ${{ matrix.mongodb-version }}

    - name: Populate database
      run: node scripts/node/populate.js test/data/*.json && node scripts/node/resolve-lexeme-ids.js

    - name: Creating indexes
      run: node scripts/node/create-indexes.js

    - name: Build glosses collection
      run: cd scripts/node && ./run.js update-glosses-collection.js

    - name: Run tests
      run: npm test

Fix make -> update in GitHub action
Fix make -> update in GitHub action
