Showing with 341 additions and 128 deletions.
  1. +17 −4 .github/workflows/ci.yml
  2. +129 −79 index.js
  3. +2 −2 package-lock.json
  4. +2 −3 package.json
  5. +191 −40 test/test.js
21 changes: 17 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,20 @@ on:
branches:
- main

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: '18.0'
- uses: actions/checkout@v4
- run: npm ci
- run: npm run lint

test:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -40,17 +53,17 @@ jobs:
- '18.x'
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- run: npm install
- if: ${{ matrix.node-version == '4.x' }}
run: npm install mocha@5.0.0 eslint@4.19.1 esquery@1.0.0 nyc@11.8.0
run: npm install mocha@5.0.0 nyc@11.8.0
- run: npm test
- run: node_modules/.bin/nyc --reporter=text-lcov node_modules/.bin/mocha | tee lcov.info
- uses: coverallsapp/github-action@master
if: ${{ matrix.node-version == '16.0' }}
if: ${{ matrix.node-version == '18.0' }}
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ matrix.node-version }}
Expand Down
Loading