<commit_before>name: test node-exist

on:
  pull_request:
    branches: 
      - master

  push:
    branches:
      - master

  workflow_dispatch:

jobs:
  build:
      strategy:
        matrix:
          os: [ubuntu-latest, windows-latest]
          node-version: [10.x, 12.x, 14.x]
          docker-tag: [latest, release, 4.7.1]

      runs-on: ${{ matrix.os }}
      steps:
      - uses: actions/checkout@v2

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}

      - name: npm install and build
        run: npm ci

      - name: Pull docker image
        run: docker pull existdb/existdb:${{ matrix.docker-tag }}

      - name: Build docker image
        run: docker create --name exist-ci -p 8080:8080 -p 8443:8443 existdb/existdb:${{ matrix.docker-tag }}

      - name: Start docker image
        run: docker start exist-ci

      - name: Wait for existdb startup
        run: sleep 20

      - name: npm test
        run: npm test<commit_msg>fix(ci): test workflow structure<commit_after>name: test node-exist

on:
  pull_request:
    branches: 
      - master

  push:
    branches:
      - master

  workflow_dispatch:

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest]
        node-version: [10.x, 12.x, 14.x]
        docker-tag: [latest, release, 4.7.1]

    steps:
      - uses: actions/checkout@v2

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}

      - name: npm install and build
        run: npm ci

      - name: Pull docker image
        run: docker pull existdb/existdb:${{ matrix.docker-tag }}

      - name: Build docker image
        run: docker create --name exist-ci -p 8080:8080 -p 8443:8443 existdb/existdb:${{ matrix.docker-tag }}

      - name: Start docker image
        run: docker start exist-ci

      - name: Wait for existdb startup
        run: sleep 20

      - name: npm test
        run: npm test
{'fraction_non_alphanumeric': 0.11583924349881797, 'fraction_numerical': 0.027423167848699765, 'mean_word_length': 1.875, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '632398', 'n_tokens_mistral': 752, 'n_tokens_neox': 656, 'n_words': 190}