name: ci

on:
  push:
    paths-ignore:
      - "*.md"
  pull_request:
    paths-ignore:
      - "*.md"

jobs:
  tests:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [12, 14, 16]
    steps:
      - uses: actions/checkout@v2.3.4
      - name: Use Node.js
        uses: actions/setup-node@v2.1.5
        with:
          node-version: ${{ matrix.node-version }}
      - name: Install
        run: |
          npm install --ignore-scripts
      - name: Run tests
        run: |
          docker-compose up -d mongodb && npm run test-ci
          docker-compose down
